Class FolderManagers
java.lang.Object
org.silverpeas.components.kmelia.control.FolderManagers
The managers of the folders having their own access rights in a Kmelia instance. When it is
enabled in the Kmelia instance, the managers of the application are forced as managers of such
folders so that they keep the hand on them: they are set as managers of the folders and, once
they are, they cannot be removed from this role.
- Author:
- mmoquillon
-
Constructor Summary
ConstructorsConstructorDescriptionFolderManagers(boolean appManagersForced, Supplier<org.silverpeas.core.admin.user.model.ProfileInst> appManagers) Constructs the managers of the folders of a Kmelia instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddApplicationManagers(org.silverpeas.core.admin.user.model.ProfileInst folderProfile) Adds the managers of the application not already in the specified profile of a folder if this profile is the one of the folder managers and if the application managers are forced as managers of the folders.static org.silverpeas.core.admin.user.model.ProfileInstapplicationManagersOf(org.silverpeas.core.admin.component.model.ComponentInst instance) Gets the managers of the specified application: those explicitly set and those inherited from the parent space.static booleanareAppManagersForcedIn(org.silverpeas.core.admin.component.model.ComponentInst instance) Are the application managers forced as managers of the folders having their own access rights in the specified Kmelia instance?static booleanareRightsOnFoldersEnabledIn(org.silverpeas.core.admin.component.model.ComponentInst instance) Are the specific access rights on the folders enabled in the specified Kmelia instance?voidcheckNoApplicationManagerRemoved(org.silverpeas.core.admin.user.model.ProfileInst folderProfile, String[] userIds, String[] groupIds) Checks the update of the specified profile of a folder with the given users and groups doesn't remove any manager of the application from the managers of the folder when the application managers are forced as managers of the folders.voidlockApplicationManagers(org.silverpeas.core.web.selection.Selection selection, String role) Locks the managers of the application in the specified selection of users and groups for the given role of a folder if this role is the one of the folder managers and if the application managers are forced as managers of the folders: they cannot be removed from the selection.
-
Constructor Details
-
FolderManagers
public FolderManagers(boolean appManagersForced, Supplier<org.silverpeas.core.admin.user.model.ProfileInst> appManagers) Constructs the managers of the folders of a Kmelia instance.- Parameters:
appManagersForced- are the application managers forced as managers of the folders having their own access rights?appManagers- a supplier of the profile of the application managers. It is invoked only when the application managers are forced as managers of the folders.
-
-
Method Details
-
areAppManagersForcedIn
public static boolean areAppManagersForcedIn(org.silverpeas.core.admin.component.model.ComponentInst instance) Are the application managers forced as managers of the folders having their own access rights in the specified Kmelia instance?- Parameters:
instance- a Kmelia instance.- Returns:
- true if the forcing of the application managers as folder managers is enabled in the instance, false otherwise.
-
areRightsOnFoldersEnabledIn
public static boolean areRightsOnFoldersEnabledIn(org.silverpeas.core.admin.component.model.ComponentInst instance) Are the specific access rights on the folders enabled in the specified Kmelia instance? When disabled, the access rights of the folders are kept as they are to be found again once enabled.- Parameters:
instance- a Kmelia instance.- Returns:
- true if the folders can have their own access rights in the instance, false otherwise.
-
applicationManagersOf
public static org.silverpeas.core.admin.user.model.ProfileInst applicationManagersOf(org.silverpeas.core.admin.component.model.ComponentInst instance) Gets the managers of the specified application: those explicitly set and those inherited from the parent space.- Parameters:
instance- a component instance.- Returns:
- the profile of the managers of the application.
-
checkNoApplicationManagerRemoved
public void checkNoApplicationManagerRemoved(org.silverpeas.core.admin.user.model.ProfileInst folderProfile, String[] userIds, String[] groupIds) Checks the update of the specified profile of a folder with the given users and groups doesn't remove any manager of the application from the managers of the folder when the application managers are forced as managers of the folders. Any other profile than the one of the folder managers isn't concerned by this check.- Parameters:
folderProfile- the actual profile of a folder having its own access rights.userIds- the identifiers of the users to set in the profile.groupIds- the identifiers of the user groups to set in the profile.- Throws:
org.silverpeas.core.security.authorization.ForbiddenRuntimeException- if a manager of the application is removed from the managers of the folder whereas the application managers are forced as folder managers.
-
lockApplicationManagers
public void lockApplicationManagers(org.silverpeas.core.web.selection.Selection selection, String role) Locks the managers of the application in the specified selection of users and groups for the given role of a folder if this role is the one of the folder managers and if the application managers are forced as managers of the folders: they cannot be removed from the selection. Nothing is locked otherwise.- Parameters:
selection- the selection of users and groups to play the role in the folder.role- the name of the role.
-
addApplicationManagers
public boolean addApplicationManagers(org.silverpeas.core.admin.user.model.ProfileInst folderProfile) Adds the managers of the application not already in the specified profile of a folder if this profile is the one of the folder managers and if the application managers are forced as managers of the folders. Nothing is done otherwise.- Parameters:
folderProfile- a profile of a folder having its own access rights.- Returns:
- true if some managers of the application have been added, false otherwise.
-