Class UserPermissionsBean
- java.lang.Object
-
- de.xima.fc.gui.common.bean.security.UserPermissionsBean
-
- All Implemented Interfaces:
IUserPermissionCheck
,Serializable
@Named @ViewScoped public class UserPermissionsBean extends Object implements IUserPermissionCheck, Serializable
Bean for handling user permissions- Since:
- 8.0.0
- Author:
- XIMA Media GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserPermissionsBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canAccessClientScopedView(Mandant client, IView view)
Checks if the user can access the given client-specific view in the context.boolean
canAccessProjectScopedView(Projekt project, IView view)
Checks if the user can access the given project-specific view in the context.boolean
hasClientAccess(Mandant client, IAccessProperty property)
Check if the user was granted the given client-specific permission for the given client.boolean
hasProjectAccess(Projekt project, IAccessProperty property)
Check if the user was granted the given project-specific permission for the given project.boolean
hasSystemAccess(IAccessProperty property)
Check if the user was granted the given
-
-
-
Method Detail
-
hasProjectAccess
public boolean hasProjectAccess(Projekt project, IAccessProperty property)
Description copied from interface:IUserPermissionCheck
Check if the user was granted the given project-specific permission for the given project.- Specified by:
hasProjectAccess
in interfaceIUserPermissionCheck
- Parameters:
project
- The project to check the permission for.property
- The project permission to check.- Returns:
- True if the user has the permission, false otherwise.
-
hasClientAccess
public boolean hasClientAccess(Mandant client, IAccessProperty property)
Description copied from interface:IUserPermissionCheck
Check if the user was granted the given client-specific permission for the given client.- Specified by:
hasClientAccess
in interfaceIUserPermissionCheck
- Parameters:
client
- The client to check the permission for.property
- The client permission to check.- Returns:
- True if the user has the permission, false otherwise.
-
hasSystemAccess
public boolean hasSystemAccess(IAccessProperty property)
Description copied from interface:IUserPermissionCheck
Check if the user was granted the given- Specified by:
hasSystemAccess
in interfaceIUserPermissionCheck
- Parameters:
property
- The system permission to check.- Returns:
- True if the user has the permission, false otherwise.
-
canAccessProjectScopedView
public boolean canAccessProjectScopedView(Projekt project, IView view)
Description copied from interface:IUserPermissionCheck
Checks if the user can access the given project-specific view in the context.- Specified by:
canAccessProjectScopedView
in interfaceIUserPermissionCheck
- Parameters:
project
- The project to check the view access for.view
- The view to check access for.- Returns:
- True if the user can access the view, false otherwise.
-
canAccessClientScopedView
public boolean canAccessClientScopedView(Mandant client, IView view)
Description copied from interface:IUserPermissionCheck
Checks if the user can access the given client-specific view in the context.- Specified by:
canAccessClientScopedView
in interfaceIUserPermissionCheck
- Parameters:
client
- The client to check the view access for.view
- The view to check access for.- Returns:
- True if the user can access the view, false otherwise.
-
-