Class UserAccess


  • public class UserAccess
    extends Object
    Author:
    XIMA MEDIA GmbH, Dresden
    • Constructor Detail

    • 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 return true.
        Parameters:
        user - the user
        property - 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 user
        property - 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 user
        property - the property to check
        ignoreLicenseAccesses - 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 and false otherwise.
      • getLicenseAccess

        public LicenseAccess getLicenseAccess()
        Gets the licenseAccess
        Returns:
        the licenseAccess