Package de.xima.fc.user
Class UserAccess
- java.lang.Object
-
- de.xima.fc.user.UserAccess
-
public class UserAccess extends Object
- Author:
- XIMA MEDIA GmbH, Dresden
-
-
Constructor Summary
Constructors Constructor Description UserAccess(LicenseAccess licenseAccess)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LicenseAccess
getLicenseAccess()
Gets the licenseAccessboolean
hasAccess(Benutzer user, EAccessProperty property)
boolean
hasClientAccess(IUser user, Mandant client, IAccessProperty property)
Checks if a user has client access.boolean
hasClientOrGeneralAccess(IUser user, Mandant client, IAccessProperty property)
Checks if a user has general or client access for the given permission.boolean
hasGeneralAccess(IUser user, IAccessProperty property)
Checks if a user has general access.boolean
hasProjectAccess(IUser user, Projekt project, IAccessProperty property)
Checks if a user has project access.boolean
hasSystemAccess(IUser user, IAccessProperty property)
Checks if a user has system access.boolean
hasSystemAccess(IUser user, IAccessProperty property, boolean ignoreLicenseAccesses)
Checks if a user has system access.
-
-
-
Constructor Detail
-
UserAccess
public UserAccess(LicenseAccess licenseAccess)
-
-
Method Detail
-
hasProjectAccess
public boolean hasProjectAccess(IUser user, Projekt project, IAccessProperty property)
Checks if a user has project access. Note: The user needs to be able to edit the project in order for this method to returntrue
.- Parameters:
user
- the userproperty
- the property to check- Returns:
true
if user has access,false
otherwhise
-
hasClientAccess
public boolean hasClientAccess(IUser user, Mandant client, IAccessProperty property)
Checks if a user has client access.- Parameters:
user
- The user for which to check whether they are allowed access to the client.client
- The client scope where to check for the given access property.property
- The property to check.- Returns:
true
if user has access,false
otherwise.
-
hasSystemAccess
public boolean hasSystemAccess(IUser user, IAccessProperty property)
Checks if a user has system access.- Parameters:
user
- the userproperty
- the property to check- Returns:
true
if user has access,false
otherwhise
-
hasSystemAccess
public boolean hasSystemAccess(IUser user, IAccessProperty property, boolean ignoreLicenseAccesses)
Checks if a user has system access.- Parameters:
user
- the userproperty
- the property to checkignoreLicenseAccesses
- if the license access of property should not be checked- Returns:
true
if user has access,false
otherwhise
-
hasGeneralAccess
public boolean hasGeneralAccess(IUser user, IAccessProperty property)
Checks if a user has general access. General permissions are independent of scope.- Parameters:
user
- The user for which to check whether they are granted the given property.property
- The property to check.- Returns:
true
if user has access,false
otherwise.
-
hasClientOrGeneralAccess
public boolean hasClientOrGeneralAccess(IUser user, Mandant client, IAccessProperty property)
Checks if a user has general or client access for the given permission.- Parameters:
user
- The user for which to check whether they are granted the given property.client
- The client scope where to check for the given access property.property
- The property to check.- Returns:
true
if the user has the given permission through general or client access andfalse
otherwise.
-
getLicenseAccess
public LicenseAccess getLicenseAccess()
Gets the licenseAccess- Returns:
- the licenseAccess
-
hasAccess
@Deprecated public boolean hasAccess(Benutzer user, EAccessProperty property)
Deprecated.Checks if an user has access.- Parameters:
user
- the userproperty
- the property to check- Returns:
true
if user has access,false
otherwhise
-
-