Interface SecurityWebService

All Superinterfaces:
Remote

public interface SecurityWebService extends Remote
  • Method Details

    • canAddElementToKey

      boolean canAddElementToKey(String uri, String key) throws RemoteException
      Checks if the current user can add elements to the collection at given key of the object.
      Parameters:
      uri - the uri of the object.
      key - the key of the field that contains the collection.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • canCreateInstances

      boolean canCreateInstances(String prototype, String projectId) throws RemoteException
      Checks if the current user can create instances of the given prototype.
      Parameters:
      prototype - the prototype of the objects.
      projectId - the id of the project to check the permission in, null to check global permissions.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • canDeleteInstance

      boolean canDeleteInstance(String uri) throws RemoteException
      Checks if the current user can delete the given object.
      Parameters:
      uri - the uri of the object.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • canModifyInstance

      boolean canModifyInstance(String uri) throws RemoteException
      Checks if the current user can modify the given object.
      Parameters:
      uri - the uri of the object.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • canModifyKey

      boolean canModifyKey(String uri, String key) throws RemoteException
      Checks if the current user can modify the field with given key of the object.
      Parameters:
      uri - the uri of the object.
      key - the key of the field.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • canReadInstance

      boolean canReadInstance(String uri) throws RemoteException
      Checks if the current user can read the given object.
      Parameters:
      uri - the uri of the object.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • canReadKey

      boolean canReadKey(String uri, String key) throws RemoteException
      Checks if the current user can read the field with given key of the object.
      Parameters:
      uri - the uri of the object.
      key - the key of the field.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • canRemoveElementFromKey

      boolean canRemoveElementFromKey(String uri, String key) throws RemoteException
      Checks if the current user can remove elements from the collection at given key of the object.
      Parameters:
      uri - the uri of the object.
      key - the key of the field that contains the collection.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • getContextRoles

      String[] getContextRoles(String location) throws RemoteException
      Returns the context (project) roles for the given location.
      Parameters:
      location - the location of the context (project/project group)
      Returns:
      an array containing the roles
      Throws:
      RemoteException
    • getContextRolesForUser

      String[] getContextRolesForUser(String userId, String location) throws RemoteException
      Returns the context roles for the given usser at the spcified location.
      Parameters:
      userId - the id of the user to get the roles for
      location - the location of the context (project/project group)
      Returns:
      an array containing the roles
      Throws:
      RemoteException
    • getGlobalRoles

      String[] getGlobalRoles() throws RemoteException
      Returns all global roles.
      Returns:
      an array containing the roles
      Throws:
      RemoteException
    • getLocationForURI

      String getLocationForURI(String uri) throws RemoteException
      Returns the location of the object with the specified uri. In the context of this service the method should be used to get the location of a project(-group).
      Parameters:
      uri - the uri of the object to get the location from
      Returns:
      a String representing the location (currently this is default:[path], e.g. default:/my-project)
      Throws:
      RemoteException
    • getProductLicense

      ProductLicense getProductLicense() throws RemoteException
      Returns the the product license.
      Returns:
      the product license.
      Throws:
      RemoteException
      Since:
      3.5.0
    • getRolesForUser

      String[] getRolesForUser(String userId, String location) throws RemoteException
      Returns all global and context roles for the context at given location assigned to the user.
      Parameters:
      userId - the id of the user to get the roles for
      location - the location of the context (project/project group), pass null to get global roles
      Returns:
      an array containing the roles
      Throws:
      RemoteException
    • getUserFromToken

      String getUserFromToken(String token) throws RemoteException
      Returns the username of the user that has the assigned token.
      Parameters:
      token -
      Returns:
      username or null, if no user has this token
      Throws:
      RemoteException
      Since:
      3.8.0
    • hasAddonLicense

      boolean hasAddonLicense(String addonId) throws RemoteException
      Checks if the current user has a license for the add-on.
      Parameters:
      addonId - The ID of the add-on for which the license check is made.
      Returns:
      true if the current user has a license for the add-on.
      Throws:
      RemoteException
      Since:
      3.23.10
    • hasCurrentUserPermission

      boolean hasCurrentUserPermission(String permission, String projectId) throws RemoteException
      Checks if given permission is granted to the current user.
      Parameters:
      permission - the permission to check.
      projectId - the id of the project to check the permission in, null to check global permissions.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • hasPermission

      boolean hasPermission(String userId, String permission, String projectId) throws RemoteException
      Checks if given permission is granted to the specified user.
      Parameters:
      userId - the id of the user to check the permission for.
      permission - the permission to check.
      projectId - the id of the project to check the permission in, null to check global permissions.
      Returns:
      true if the permission is granted.
      Throws:
      RemoteException
      Since:
      3.4.3
    • updateUserAccountVault

      void updateUserAccountVault(String vaultKey, String userName, String password) throws RemoteException
      Updates the user account vault record if the user has administration permissions.
      Parameters:
      vaultKey -
      userName -
      password -
      Throws:
      RemoteException
      Since:
      3.21.1