java.lang.Object | |
↳ | com.atlassian.jira.user.util.UserUtilImpl |
This is the default implementation of the UserUtil interface.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DIRECTORY_ID | ||||||||||
String | DIRECTORY_NAME | ||||||||||
String | DISPLAY_NAME | ||||||||||
String | |||||||||||
String | PASSWORD_HOURS | ||||||||||
String | PASSWORD_TOKEN | ||||||||||
String | SEND_EMAIL | ||||||||||
String | USERNAME |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.atlassian.jira.user.util.UserUtil
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Takes the given user and adds him/her to all the groups that grant a user the global JIRA use permission.
| |||||||||||
This is used to add a specified user to a specified group.
| |||||||||||
This is used to add a user to many groups at once.
| |||||||||||
Returns true if, after adding the specified number of users, the number of active users in JIRA does not exceed
the user limit allowed by the license.
| |||||||||||
Returns true if, after adding the specified users, the number of active users in JIRA does not exceed the user
limit allowed by the license.
| |||||||||||
Can be called to set the password for a user.
| |||||||||||
Clears the cache of the active user count so that it can be recalculated.
| |||||||||||
Creates a User from supplied details.
| |||||||||||
Creates a User from supplied details.
| |||||||||||
Creates a User from supplied details.
| |||||||||||
Creates a User from supplied details.
| |||||||||||
Generates a Random Password that can be used when the user has entered a blank password.
| |||||||||||
This is used to generate a reset password token that last a certain time and allows a person to access a page
anonymously so they can reset their password.
| |||||||||||
Returns the number of users that are currently 'active'.
| |||||||||||
Returns a list of JIRA admin
User s. | |||||||||||
Returns the all users defined in JIRA, regardless of whether they are active or not.
| |||||||||||
Returns the all users defined in JIRA, regardless of whether they are active or not.
| |||||||||||
Returns a collection of
User objects that belong to any of the passed in collection of group names. | |||||||||||
Returns a collection of
User objects that belong to any of the passed in collection of group names. | |||||||||||
Retrieve a collection of ProjectComponents - where the lead of each component is the specified user.
| |||||||||||
Retrieve a collection of ProjectComponents - where the lead of each component is the specified user.
| |||||||||||
Takes the given user and returns a "displayable name" by cautiously checking the different edge cases for users.
| |||||||||||
Takes the given user and returns a "displayable name" by cautiously checking the different edge cases for users.
| |||||||||||
Get a Group by name.
| |||||||||||
Returns a collection of the names of the groups that the user belongs to.
| |||||||||||
Returns a
Group based on user name. | |||||||||||
Returns a collection of
Group objects that the user belongs to. | |||||||||||
Returns a list of JIRA admin
User s. | |||||||||||
Returns a list of JIRA system admin
User s. | |||||||||||
Returns number of issues assigned to user
| |||||||||||
Returns number of issues assigned to user
| |||||||||||
Returns number of issues reported by user
| |||||||||||
Returns number of issues reported by user
| |||||||||||
Returns all the projects that leadUser is the project lead for.
| |||||||||||
Returns all the projects that leadUser is the project lead for.
| |||||||||||
Returns a list of JIRA system admin
User s. | |||||||||||
Returns the total number of users defined in JIRA, regardless of whether they are active or not.
| |||||||||||
Get a User by name.
| |||||||||||
Returns a user based on key.
| |||||||||||
Returns a user based on user name.
| |||||||||||
Returns a user based on user name.
| |||||||||||
Returns the all users defined in JIRA, regardless of whether they are active or not.
| |||||||||||
Returns a collection of
User objects that are found within the passed in collection
of group names. | |||||||||||
Returns true if this JIRA instance has more active users, than allowed by the license.
| |||||||||||
Checking if user without SYSTEM_ADMIN rights tries to remove user with SYSTEM_ADMIN rights.
| |||||||||||
Checking if user without SYSTEM_ADMIN rights tries to remove user with SYSTEM_ADMIN rights.
| |||||||||||
This will remove the user and removes the user from all the groups.
| |||||||||||
This will remove the user and removes the user from all the groups.
| |||||||||||
This is used to remove a specified user from a specified group.
| |||||||||||
This is used to remove a user from many groups at once.
| |||||||||||
This method wil be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
| |||||||||||
Returns true if the a user exists with the specified userName
| |||||||||||
This can be called to validate a token against the user.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A Factory method to get the PortalPageService.
| |||||||||||
A Factory method to get the SearchRequestService.
| |||||||||||
Protected level factory method to allow for better test integration
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.extension.Startable
| |||||||||||
From interface
com.atlassian.jira.user.util.UserUtil
|
Takes the given user and adds him/her to all the groups that grant a user the global JIRA use permission. (see
USE
) Note: operation is only performed if by doing so we will not
exceed the user limit (if the current license happens to specify a limit)
user | The user to be added to the USE permission |
---|
This is used to add a specified user to a specified group. The user will be added to the group if the user is not already a member of the group.
group | the group to add the user to. |
---|---|
userToAdd | the user to add to the group. |
PermissionException | |
---|---|
AddException |
This is used to add a user to many groups at once.
groups | a list containing the groups to add the user to. |
---|---|
userToAdd | the user to add to the group. |
PermissionException | |
---|---|
AddException |
Returns true if, after adding the specified number of users, the number of active users in JIRA does not exceed the user limit allowed by the license. If the license does not require a user limit, this method will return true immediately.
numUsers | the number of users to add to the JIRA instance. If 0, all things being equal, this method will return true. Must not be negative! |
---|
Returns true if, after adding the specified users, the number of active users in JIRA does not exceed the user limit allowed by the license. If a user specified is already active, or cannot be found, they are not counted towards the user limit. If the limit has already been exceeded, but none of the users specified are inactive, the result will still be true, as these users are already active and thus nothing changes. If the license does not require a user limit, this method will return true immediately.
userNames | the names of the users to add to the JIRA instance. Must not be null! |
---|
Can be called to set the password for a user. This will delete any password request tokens associated with that user
user | the user in play |
---|---|
newPassword | their new password |
PermissionException |
---|
Clears the cache of the active user count so that it can be recalculated. This method should be used when performing operations that will modify the number of active users in the system.
Creates a User from supplied details.
No email notification will be send to created user.
username | The username of the new user. Needs to be lowercase and unique. |
---|---|
password | The password for the new user. |
emailAddress | The email for the new user. Needs to be a valid email address. |
displayName | The display name for the new user |
Creates a User from supplied details.
No email notification will be send to created user.
username | The username of the new user. Needs to be lowercase and unique. |
---|---|
password | The password for the new user. |
emailAddress | The email for the new user. Needs to be a valid email address. |
displayName | The display name for the new user |
directoryId | The directory to create the user in. Null means "first writable directory". |
Creates a User from supplied details.
Email notification will be send to created user.
username | The username of the new user. Needs to be lowercase and unique. |
---|---|
password | The password for the new user. |
The email for the new user. Needs to be a valid email address. | |
fullname | The full name for the new user |
directoryId | The directory to create the user in. Null means "first writable directory". |
userEventType | The event type dispatched on user creation.
Either USER_CREATED or USER_SIGNUP |
Creates a User from supplied details.
Email notification will be send to created user.
username | The username of the new user. Needs to be lowercase and unique. |
---|---|
password | The password for the new user. |
The email for the new user. Needs to be a valid email address. | |
fullname | The full name for the new user |
userEventType | The event type dispatched on user creation.
Either USER_CREATED or USER_SIGNUP |
Generates a Random Password that can be used when the user has entered a blank password.
The password is guaranteed to contain at least one upper-case letter, lower-case letter and number in case the backend user Directory has password restrictions.
This is used to generate a reset password token that last a certain time and allows a person to access a page anonymously so they can reset their password.
The generated token will be associated with the named user so that that this information can be verified at a later time.user | the user in question. This MUST not be null |
---|
Returns the number of users that are currently 'active'. For a user to be active, means that it must belong to a
group that has either the JIRA-users, JIRA-administrators or JIRA-Systemadministartors global permission.
Implementations of this method should take performance into consideration, and ensure that the value is cached.
Use clearActiveUserCount()
to clear the cache.
Returns the all users defined in JIRA, regardless of whether they are active or not.
Returns the all users defined in JIRA, regardless of whether they are active or not.
Returns a collection of User
objects that belong to any of the passed in collection of group names.
Prefer using getAllUsersInGroupNamesUnsorted(java.util.Collection)
and sorting the list of users only
if absolutely necessary rather than relying on this method to perform the sort.
groupNames | a collection of group name strings |
---|
UserCachingComparator
order
Returns a collection of User
objects that belong to any of the passed in collection of group names.
groupNames | a collection of group name strings |
---|
Returns a collection of User
objects that are found within the passed in collection of Group
objects.
groups | a collection of Group objects |
---|
UserCachingComparator
order
Retrieve a collection of ProjectComponents - where the lead of each component is the specified user.
user | User leading components |
---|
Retrieve a collection of ProjectComponents - where the lead of each component is the specified user.
user | User leading components |
---|
Takes the given user and returns a "displayable name" by cautiously checking the different edge cases for users.
user | the user. May be null. |
---|
Takes the given user and returns a "displayable name" by cautiously checking the different edge cases for users.
user | the user. May be null. |
---|
Get a Group by name.
groupName | the name of the group |
---|
Returns a collection of the names of the groups that the user belongs to.
userName | A User name |
---|
Returns a collection of Group
objects that the user belongs to.
userName | A User name |
---|
Returns a list of JIRA system admin User
s.
WARNING: This method will be changed in the future to return a Collection of Crowd User
objects. Since v4.3.
User
's that are associated with the SYSTEM_ADMIN
permission.Returns number of issues assigned to user
loggedInUser | the logged in user |
---|---|
user | the user to find the issue count for |
SearchException |
---|
Returns number of issues assigned to user
loggedInUser | the logged in user |
---|---|
user | the user to find the issue count for |
SearchException |
---|
Returns number of issues reported by user
loggedInUser | the logged in user |
---|---|
user | the user to find the issue count for |
SearchException |
---|
Returns number of issues reported by user
loggedInUser | the logged in user |
---|---|
user | the user to find the issue count for |
SearchException |
---|
Returns all the projects that leadUser is the project lead for.
user | the user in play |
---|
Returns all the projects that leadUser is the project lead for.
user | the user in play |
---|
Returns a list of JIRA system admin User
s.
WARNING: This method will be changed in the future to return a Collection of Crowd User
objects. Since v4.3.
User
's that are associated with the SYSTEM_ADMIN
permission.Returns the total number of users defined in JIRA, regardless of whether they are active or not.
Get a User by name.
userName | the name of the user |
---|
Returns a user based on key.
key | the key of the user |
---|
Returns a user based on user name.
username | the user name of the user |
---|
Returns a user based on user name.
userName | the user name of the user |
---|
Returns the all users defined in JIRA, regardless of whether they are active or not.
Returns a collection of User
objects that are found within the passed in collection
of group names. Null users are excluded even if they exist in the underlying data.
groupNames | a collection of group name strings |
---|
Returns a collection of User
objects that are found within the passed in collection
of Group
objects. Null users are excluded even if they exist in the underlying data.
groups | a collection of Group objects |
---|
UserCachingComparator
orderReturns true if this JIRA instance has more active users, than allowed by the license. If the license does not require a user limit, this method will return false immediately.
Checking if user without SYSTEM_ADMIN rights tries to remove user with SYSTEM_ADMIN rights.
loggedInUser | User performing operation |
---|---|
user | User for remove |
Checking if user without SYSTEM_ADMIN rights tries to remove user with SYSTEM_ADMIN rights.
loggedInUser | User performing operation |
---|---|
user | User for remove |
This will remove the user and removes the user from all the groups. All components lead by user will have lead cleared.
loggedInUser | the user performing operation |
---|---|
user | the user to delete |
This will remove the user and removes the user from all the groups. All components lead by user will have lead cleared.
loggedInUser | the user performing operation |
---|---|
user | the user to delete |
This is used to remove a specified user from a specified group. The user will be removed from the group only if the user is already a member of the group.
group | the group to add the user to. |
---|---|
userToRemove | the user to add to the group. |
This is used to remove a user from many groups at once.
groups | a list containing the groups to add the user to. |
---|---|
userToRemove | the user to add to the group. |
This method wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
Exception |
---|
Returns true if the a user exists with the specified userName
userName | the name of the user |
---|
This can be called to validate a token against the user.
user | the user in play |
---|---|
token | the token they provided |
A Factory method to get the PortalPageService. This helps break the cyclic dependency of PortalPageService to UserUtils AND allows test to override the value used.
A Factory method to get the SearchRequestService. This helps break the cyclic dependency of SearchRequestService to UserUtils AND allows test to override the value used.
Protected level factory method to allow for better test integration
user | the user in action |
---|