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 LicenseAccessgetLicenseAccess()Gets the licenseAccessbooleanhasAccess(Benutzer user, EAccessProperty property)booleanhasClientAccess(IUser user, Mandant client, IAccessProperty property)Checks if a user has client access.booleanhasClientOrGeneralAccess(IUser user, Mandant client, IAccessProperty property)Checks if a user has general or client access for the given permission.booleanhasGeneralAccess(IUser user, IAccessProperty property)Checks if a user has general access.booleanhasProjectAccess(IUser user, Projekt project, IAccessProperty property)Checks if a user has project access.booleanhasSystemAccess(IUser user, IAccessProperty property)Checks if a user has system access.booleanhasSystemAccess(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:
trueif user has access,falseotherwhise
-
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:
trueif user has access,falseotherwise.
-
hasSystemAccess
public boolean hasSystemAccess(IUser user, IAccessProperty property)
Checks if a user has system access.- Parameters:
user- the userproperty- the property to check- Returns:
trueif user has access,falseotherwhise
-
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:
trueif user has access,falseotherwhise
-
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:
trueif user has access,falseotherwise.
-
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:
trueif the user has the given permission through general or client access andfalseotherwise.
-
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:
trueif user has access,falseotherwhise
-
-