Interface SecurityWebService
- All Superinterfaces:
Remote
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canAddElementToKey
(String uri, String key) Checks if the current user can add elements to the collection at given key of the object.boolean
canCreateInstances
(String prototype, String projectId) Checks if the current user can create instances of the given prototype.boolean
canDeleteInstance
(String uri) Checks if the current user can delete the given object.boolean
canModifyInstance
(String uri) Checks if the current user can modify the given object.boolean
canModifyKey
(String uri, String key) Checks if the current user can modify the field with given key of the object.boolean
canReadInstance
(String uri) Checks if the current user can read the given object.boolean
canReadKey
(String uri, String key) Checks if the current user can read the field with given key of the object.boolean
canRemoveElementFromKey
(String uri, String key) Checks if the current user can remove elements from the collection at given key of the object.String[]
getContextRoles
(String location) Returns the context (project) roles for the given location.String[]
getContextRolesForUser
(String userId, String location) Returns the context roles for the given usser at the spcified location.String[]
Returns all global roles.getLocationForURI
(String uri) Returns the location of the object with the specified uri.Returns the product license.String[]
getRolesForUser
(String userId, String location) Returns all global and context roles for the context at given location assigned to the user.getUserFromToken
(String token) Returns the username of the user that has the assigned token.boolean
hasAddonLicense
(String addonId) Checks if the current user has a license for the add-on.boolean
hasCurrentUserPermission
(String permission, String projectId) Checks if given permission is granted to the current user.boolean
hasPermission
(String userId, String permission, String projectId) Checks if given permission is granted to the specified user.void
updateUserAccountVault
(String vaultKey, String userName, String password) Updates the user account vault record if the user has administration permissions.
-
Method Details
-
canAddElementToKey
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
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
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
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
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
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
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
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
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
Returns the context roles for the given usser at the spcified location.- Parameters:
userId
- the id of the user to get the roles forlocation
- the location of the context (project/project group)- Returns:
- an array containing the roles
- Throws:
RemoteException
-
getGlobalRoles
Returns all global roles.- Returns:
- an array containing the roles
- Throws:
RemoteException
-
getLocationForURI
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
Returns the product license. Not supported when using SALT Cloud licensing.- Returns:
- the product license.
- Throws:
RemoteException
- Since:
- 3.5.0
-
getRolesForUser
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 forlocation
- the location of the context (project/project group), pass null to get global roles- Returns:
- an array containing the roles
- Throws:
RemoteException
-
getUserFromToken
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
Checks if the current user has a license for the add-on. Not supported when using SALT Cloud licensing.- 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
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
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
-