Skip to content

Commit

Permalink
[GOOGLEAPPS-24] #resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
ilgrosso committed Dec 6, 2024
1 parent 1191275 commit 2163398
Show file tree
Hide file tree
Showing 6 changed files with 710 additions and 400 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public String handleResult(final Directory.Groups.Aliases.Insert request, final
}
}
}

List<Object> members = accessor.findList(GoogleAppsUtil.MEMBERS_ATTR);
if (null != members) {
final Directory.Members membersService = configuration.getDirectory().members();
Expand Down Expand Up @@ -309,20 +309,6 @@ public Uid handleResult(final Directory.Orgunits.Insert request, final OrgUnit v
}

if (GoogleAppsUtil.LICENSE_ASSIGNMENT.equals(objectClass)) {
// @formatter:off
/* AlreadyExistsException
* {
* "code" : 400,
* "errors" : [ {
* "domain" : "global",
* "message" : "Invalid Ou Id",
* "reason" : "invalid"
* } ],
* "message" : "Invalid Ou Id"
* }
*/
// @formatter:on

return GoogleApiExecutor.execute(
LicenseAssignmentsHandler.create(configuration.getLicensing().licenseAssignments(), accessor),
new RequestResultHandler<Licensing.LicenseAssignments.Insert, LicenseAssignment, Uid>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,6 @@ public void execute() {
} else if (ObjectClass.GROUP.equals(objectClass)) {
directoryRequest = configuration.getDirectory().groups().delete(uid.getUidValue());
} else if (GoogleAppsUtil.MEMBER.equals(objectClass)) {
// @formatter:off
/* Already deleted
* {
* "code" : 400,
* "errors" : [ {
* "domain" : "global",
* "message" : "Missing required field: memberKey",
* "reason" : "required"
* } ],
* "message" : "Missing required field: memberKey"
* }
*/
// @formatter:on
String[] ids = uid.getUidValue().split("/");
if (ids.length == 2) {
directoryRequest = configuration.getDirectory().members().delete(ids[0], ids[1]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,10 @@ public String handleResult(final Directory.Users.List request, final Users value
if (null != value.getUsers()) {
for (User user : value.getUsers()) {
handler.handle(UserHandler.fromUser(
configuration, user, attributesToGet, configuration.getDirectory().
groups()));
configuration,
user,
attributesToGet,
configuration.getDirectory().groups()));
}
}
return value.getNextPageToken();
Expand Down
Loading

0 comments on commit 2163398

Please sign in to comment.