Merge 1.2.0 changes back to master.

This commit is contained in:
Michael Jumper
2020-06-21 19:29:55 -07:00
2 changed files with 3 additions and 5 deletions

View File

@@ -155,7 +155,7 @@ public abstract class JDBCEnvironment extends LocalEnvironment {
/** /**
* Returns a boolean value representing whether or not the JDBC module * Returns a boolean value representing whether or not the JDBC module
* should automatically create accounts within the database for users that * should automatically create accounts within the database for users that
* are successfully authenticated via other extensions. Returns true if * are successfully authenticated via other extensions. Returns true if
* accounts should be auto-created, otherwise returns false. * accounts should be auto-created, otherwise returns false.
* *
* @return * @return

View File

@@ -411,7 +411,7 @@ public abstract class ModeledDirectoryObjectService<InternalType extends Modeled
/** /**
* Returns an immutable collection of permissions that should be granted due * Returns an immutable collection of permissions that should be granted due
* to the creation of the given object. These permissions need not be * to the creation of the given object. These permissions need not be
* granted solely to the user creating the object. * granted solely to the user creating the object.
* *
* @param user * @param user
@@ -431,15 +431,13 @@ public abstract class ModeledDirectoryObjectService<InternalType extends Modeled
// thus lacking database backing. // thus lacking database backing.
if (user.getUser().isSkeleton()) if (user.getUser().isSkeleton())
return Collections.emptyList(); return Collections.emptyList();
// Get the user model and check for an entity ID.
UserModel userModel = user.getUser().getModel();
// Build list of implicit permissions // Build list of implicit permissions
Collection<ObjectPermissionModel> implicitPermissions = Collection<ObjectPermissionModel> implicitPermissions =
new ArrayList<>(IMPLICIT_OBJECT_PERMISSIONS.length); new ArrayList<>(IMPLICIT_OBJECT_PERMISSIONS.length);
UserModel userModel = user.getUser().getModel();
for (ObjectPermission.Type permission : IMPLICIT_OBJECT_PERMISSIONS) { for (ObjectPermission.Type permission : IMPLICIT_OBJECT_PERMISSIONS) {
// Create model which grants this permission to the current user // Create model which grants this permission to the current user