protected Collection < ObjectPermissionModel > getImplicitPermissions ( ModeledAuthenticatedUser user , ModelType model ) { // Build list of implicit permissions Collection < ObjectPermissionModel > implicitPermissions = new ArrayList < ObjectPermissionModel > ( IMPLICIT_OBJECT_PERMISSIONS . length ) ; UserModel userModel = user . getUser ( ) . getModel ( ) ; for ( ObjectPermission . Type permission : IMPLICIT_OBJECT_PERMISSIONS ) { // Create model which grants this permission to the current user ObjectPermissionModel permissionModel = new ObjectPermissionModel ( ) ; permissionModel . setEntityID ( userModel . getEntityID ( ) ) ; permissionModel . setType ( permission ) ; permissionModel . setObjectIdentifier ( model . getIdentifier ( ) ) ; // Add permission implicitPermissions . add ( permissionModel ) ; } return implicitPermissions ; }
Returns a collection of permissions that should be granted due to the creation of the given object . These permissions need not be granted solely to the user creating the object .