public interface Security
Modifier and Type | Method and Description |
---|---|
boolean |
canAdmin(RepoPath path)
Deprecated.
Use
#canManage() instead |
boolean |
canAnnotate(RepoPath repoPath) |
boolean |
canDelete(RepoPath path) |
boolean |
canDeploy(RepoPath path) |
boolean |
canManage(RepoPath path) |
boolean |
canRead(RepoPath path) |
User |
currentUser() |
String |
currentUsername()
Deprecated.
Use
getCurrentUsername() instead |
User |
findUser(String username)
Accessible only if current user is an admin.
|
String[] |
getCurrentUserGroupNames()
The group names for the current logged-in user.
|
String[] |
getCurrentUserGroupNames(RealmAwareGroupsSettings settings)
Retrieves the groups of the current user according to the given realm settings
Available realms are
LdapGroupsSettings and CrowdGroupsSettings |
String |
getCurrentUsername() |
String |
getEncryptedPassword() |
String |
getEscapedEncryptedPassword() |
boolean |
isAdmin() |
boolean |
isAnonAccessEnabled() |
boolean |
isAnonymous() |
boolean |
isAuthenticated() |
boolean |
isUpdatableProfile() |
void |
populateUserProperties(User user)
Attaches all the user properties to the given user
|
void |
updateUser(User user)
Update the user with the same username as the user.getUsername() passed.
NOTE: Only updatable fields will be updated. The user object cannot be null, and user.getUsername() should represent an existing non-anonymous or system user. |
boolean isUpdatableProfile()
boolean isAnonAccessEnabled()
boolean canRead(RepoPath path)
boolean canAnnotate(RepoPath repoPath)
boolean canDelete(RepoPath path)
boolean canDeploy(RepoPath path)
@Deprecated boolean canAdmin(RepoPath path)
#canManage()
insteadboolean canManage(RepoPath path)
String getCurrentUsername()
@Deprecated String currentUsername()
getCurrentUsername()
insteadString[] getCurrentUserGroupNames()
String[] getCurrentUserGroupNames(RealmAwareGroupsSettings settings)
LdapGroupsSettings
and CrowdGroupsSettings
settings
- Realm specific settingsboolean isAdmin()
boolean isAnonymous()
boolean isAuthenticated()
String getEncryptedPassword()
String getEscapedEncryptedPassword()
User currentUser()
User findUser(String username)
SecurityException
- if the current user is not an admin uservoid populateUserProperties(User user)
user
- The user to attach properties tovoid updateUser(User user)
user
- the user with all the fields to updateSecurityException
- if the current user is not an admin user, if the user passed is the anonymous user,
if one of the group passed does not existsorg.artifactory.storage.StorageException
- if the user could not updatedCopyright © 2016. All rights reserved.