Package de.xima.fc.gui.common.utils
Class PermissionUtils
- java.lang.Object
-
- de.xima.fc.gui.common.utils.PermissionUtils
-
public class PermissionUtils extends Object
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description PermissionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static boolean
canSadminAccessClient(Mandant client)
static boolean
canUserAccessFormRecord(UserContext uc, Benutzer user, Vorgang process)
Checks whether or not the user has permission to access meta information of form record such as its historystatic boolean
canUserAccessInbox(Benutzer user, Postfach inbox)
static boolean
canUserAccessInbox(Benutzer user, Integer inboxId)
static boolean
canUserAccessProcess(Benutzer user, long processId)
Deprecated.static boolean
canUserAccessProcess(Benutzer user, Vorgang process)
Deprecated.static boolean
canUserAccessProcess(Benutzer user, String puid)
Deprecated.static boolean
canUserAccessProjectPage(UserContext uc, Benutzer user, Projekt project, EAccessProperty... props)
static boolean
canUserAccessProjectPage(UserContext uc, Benutzer user, Rolle role, Mandant client, boolean isEditingAllowed, EAccessProperty... props)
static boolean
canUserAccessProjectPage(UserContext uc, Benutzer user, Rolle role, Projekt project, boolean isEditingAllowed, EAccessProperty... props)
Whether the user is allowed access to the given project page (or action).static boolean
hasUserInboxAccess(Benutzer user, Mandant client)
Checks whether the user has access to inboxesstatic boolean
isFormRecordDataAccessible(Vorgang formRecord)
static boolean
isTestCloudClient(Mandant client, Benutzer user)
Whether the client is a test client with the system license of typeELicenseType.CLOUD
.
-
-
-
Method Detail
-
canUserAccessFormRecord
public static final boolean canUserAccessFormRecord(UserContext uc, Benutzer user, Vorgang process)
Checks whether or not the user has permission to access meta information of form record such as its history- Parameters:
uc
-UserContext
to useuser
-Benutzer
to check permission forprocess
-Vorgang
to check- Returns:
- whether or not the user can access meta info of the form record
-
hasUserInboxAccess
public static final boolean hasUserInboxAccess(Benutzer user, Mandant client)
Checks whether the user has access to inboxes
-
canSadminAccessClient
public static boolean canSadminAccessClient(Mandant client)
- Parameters:
client
- Client to check.- Returns:
- Whether the super administrator is allowed access to the given client. If
null
was passed for the client, returnstrue
.
-
canUserAccessProjectPage
public static final boolean canUserAccessProjectPage(UserContext uc, Benutzer user, Rolle role, Projekt project, boolean isEditingAllowed, EAccessProperty... props)
Whether the user is allowed access to the given project page (or action). They need to have the correct role property, and if the project page allows editing, they also need to be in the correct user group. This checks whether- the user is a member of one of the
Projekt.getEditorBenutzerGruppen()
(if the project page requires it) - the user is granted to the correct
RolleProperties.getFCProperty(EAccessProperty)
- Parameters:
uc
- Current user context.user
- User to check.role
- The role of the given user.project
- Project to check.isEditingAllowed
- Whether the given user belongs to any of theProjekt.getEditorBenutzerGruppen()
user groups.props
- Some of theEViews
corresponding to the following viewsEViews.PROJECT_UPDATE
EViews.PROJEKT_ACCESS
EViews.PROJEKT_COPY
EViews.PROJEKT_DATATABLE
EViews.PROJEKT_DESIGNER
EViews.PROJEKT_INBOX
EViews.PROJEKT_PUBLISH
EViews.PROJEKT_DOI
EViews.PROJEKT_PREVIEW
EViews.PROJEKT_RESOURCES
EViews.PROJEKT_VERSIONS
EViews.PROJEKT_WORKFLOW
EViews.PROJEKT_XF_DESIGNER
EViews.PROJEKT_DESIGNER_FORM
EViews.PROJEKT_DESIGNER_WORKFLOW
EAccessProperty
s:- Returns:
- Whether the user is allowed to access the given project page for the given project.
- the user is a member of one of the
-
canUserAccessProjectPage
public static final boolean canUserAccessProjectPage(UserContext uc, Benutzer user, Rolle role, Mandant client, boolean isEditingAllowed, EAccessProperty... props)
-
canUserAccessProjectPage
public static final boolean canUserAccessProjectPage(UserContext uc, Benutzer user, Projekt project, EAccessProperty... props)
- Parameters:
uc
- Current user context.user
- User to check.project
- Project to check.props
- Project page(s) to check.- Returns:
- Whether the user is allowed access to all the given properties.
-
isFormRecordDataAccessible
public static final boolean isFormRecordDataAccessible(Vorgang formRecord)
-
isTestCloudClient
public static final boolean isTestCloudClient(Mandant client, Benutzer user)
Whether the client is a test client with the system license of typeELicenseType.CLOUD
.- Parameters:
client
- Client to check.user
- User to check.- Returns:
- Whether the client is a test client of the CLOUD.
-
canUserAccessProcess
@Deprecated public static final boolean canUserAccessProcess(Benutzer user, Vorgang process)
Deprecated.
-
canUserAccessProcess
@Deprecated public static final boolean canUserAccessProcess(Benutzer user, String puid)
Deprecated.
-
canUserAccessProcess
@Deprecated public static final boolean canUserAccessProcess(Benutzer user, long processId)
Deprecated.
-
-