Package org.graylog2.shared.users
Interface UserService
- All Superinterfaces:
PersistedService
- All Known Subinterfaces:
UserManagementService
- All Known Implementing Classes:
UserManagementServiceImpl,UserServiceImpl
-
Method Summary
Modifier and TypeMethodDescriptionlongcount()create()intintdeleteById(String userId) voidDeprecated.getGRNPermissionsForUser(User user) List<org.apache.shiro.authz.Permission>getPermissionsForUser(User user) getRoleNames(User user) Get the root user.List<org.apache.shiro.authz.permission.WildcardPermission>loadAll()loadAllByName(String username) loadAllForAuthServiceBackend(String authServiceBackendId) loadAllForRole(Role role) loadByAuthServiceUidOrUsername(String authServiceUid, String username) Tries to find a user for the given authentication service UID or username.loadByIds(Collection<String> ids) Methods inherited from interface org.graylog2.plugin.database.PersistedService
destroy, destroyAll, save, saveWithoutValidation, validate, validate, validate
-
Method Details
-
load
-
loadAllByName
-
loadById
-
loadByIds
-
loadByAuthServiceUidOrUsername
Tries to find a user for the given authentication service UID or username. (in that order)- Parameters:
authServiceUid- the authentication service UID (tried first)username- the username (tried second)- Returns:
- the user or an empty option if no user can be found
-
delete
-
deleteById
-
create
User create() -
loadAll
-
getAdminUser
Deprecated.If you really need the root user, usegetRootUser()instead. -
getRootUser
Get the root user. The root user might not be present in all environments and there shouldn't really be a need to explicitly refer to the root user. But if you really need it, here you go.- Returns:
- The root user, if present. An empty optional otherwise.
-
count
long count() -
loadAllForAuthServiceBackend
-
getRoleNames
-
getPermissionsForUser
-
getWildcardPermissionsForUser
-
getGRNPermissionsForUser
-
getUserPermissionsFromRoles
-
getRootUser()instead.