bug5828: formatting only

This commit is contained in:
Axel Uhl
2023-03-31 17:54:10 +02:00
parent 9926b99846
commit 9b493a7764
3 changed files with 5 additions and 5 deletions
@@ -767,6 +767,8 @@ public class LandscapeServiceImpl implements LandscapeService {
} else {
final UUID groupId = securityServiceServer.createUserGroupAndAddCurrentUser(serverGroupName);
try {
// try to set the group owner of the new group to the group itself, allowing all users with role user:{group-name} to
// change / edit it.
securityServiceServer.setGroupAndUserOwner(SecuredSecurityTypes.USER_GROUP, new TypeRelativeObjectIdentifier(groupId.toString()),
Optional.empty() /* displayName */, Optional.of(groupId), Optional.empty() /* leave user owner unchanged */);
} catch (Exception e) {
@@ -147,7 +147,8 @@ public interface SecurityService extends ReplicableWithObjectInputStream<Replica
/**
* Creates a user group with the given {@code id} and {@code name} and makes the calling subject
* its owner and a member of the group and assigns the {@code user} role qualified to the new
* group to the calling subject ({@code user:{name}}).
* group to the calling subject ({@code user:{name}}) as a "transitive" role assignment, allowing
* the user to grant that role also to other users, in turn.
*/
UserGroup createUserGroup(UUID id, String name) throws UserGroupManagementException;
@@ -2522,17 +2522,14 @@ implements ReplicableSecurityService, ClearStateTestSupport {
for (User user : source.getUsers()) {
addUserToUserGroup(destination, user);
}
for (Map.Entry<RoleDefinition, Boolean> entr : source.getRoleDefinitionMap().entrySet()) {
putRoleDefinitionToUserGroup(destination, entr.getKey(), entr.getValue());
}
for (Pair<User, Role> userAndRole : store.getRolesQualifiedByUserGroup(source)) {
final Role existingRole = userAndRole.getB();
final Role copyRole = new Role(existingRole.getRoleDefinition(), destination,
existingRole.getQualifiedForUser(), existingRole.isTransitive());
addRoleForUser(userAndRole.getA(),
copyRole);
addRoleForUser(userAndRole.getA(), copyRole);
callback.onRoleCopy(userAndRole.getA(), existingRole, copyRole);
}
}