|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserAccessor
Field Summary | |
---|---|
static String |
ANONYMOUS
Deprecated. since 4.0 not used in Confluence |
static List<String> |
DEFAULT_GROUP_NAMES
List of group names that are automatically created during Confluence setup. |
static String |
GROUP_CONFLUENCE_ADMINS
The name of the group with special administration privileges in the application. |
static String |
GROUP_CONFLUENCE_USERS
The name of the group that users are added to by default. |
static String |
PROFILE_PICTURE_BUILTIN_PATH
Relative path to default profile pictures in the web application, used to determine whether a user has uploaded a custom profile picture. |
static String |
USER_GROUP_SUFFIX
Deprecated. since 4.0 not used in Confluence |
Method Summary | |
---|---|
int |
countUsersWithConfluenceAccess()
Returns the number of users which have access to use Confluence. |
List<com.atlassian.user.Group> |
filterUnaccessibleGroups(List<com.atlassian.user.Group> groupList,
com.atlassian.user.User user)
|
com.atlassian.user.search.page.Pager<com.atlassian.user.Group> |
filterUnaccessibleGroups(com.atlassian.user.search.page.Pager<com.atlassian.user.Group> groupPager,
com.atlassian.user.User user)
Filters a pager of groups based on the passed User . |
List<com.atlassian.user.User> |
filterUnaccessibleUsers(List<com.atlassian.user.User> groupList,
com.atlassian.user.User user)
|
com.atlassian.user.search.page.Pager<com.atlassian.user.User> |
filterUnaccessibleUsers(com.atlassian.user.search.page.Pager<com.atlassian.user.User> userPager,
com.atlassian.user.User user)
Filters a pager of Users based on the groups of the passed User . |
List<com.atlassian.user.User> |
findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> search)
|
ConfluenceUserPreferences |
getConfluenceUserPreferences(com.atlassian.user.User user)
|
List<String> |
getGroupNames(com.atlassian.user.User user)
Gets the list of group names representing the groups the passed in user is a member of. |
List<String> |
getGroupNamesForUserName(String userName)
Gets the list of group names representing the groups the passed in user is a member of. |
List<com.atlassian.user.Group> |
getGroupsAsList()
|
List<com.atlassian.user.Group> |
getGroupsAsList(com.atlassian.user.User user)
Deprecated. since 3.5.4 callers should use getGroupNames(User) or getGroupNamesForUserName(String) |
List<String> |
getMemberNamesAsList(com.atlassian.user.Group group)
Same as UserAccessor.getMemberNames(com.atlassian.user.Group) but returns a List of user names as String s
rather than a Pager. |
com.atlassian.user.User |
getUserIfAvailable(String username)
Get the User if visible to the currently authenticated user in shared mode. |
List<String> |
getUserNamesWithConfluenceAccess()
Returns the names of all users with access to use Confluence. |
ProfilePictureInfo |
getUserProfilePicture(String username)
Deprecated. since 2.9. Use getUserProfilePicture(User) instead. |
ProfilePictureInfo |
getUserProfilePicture(com.atlassian.user.User user)
Retrieve the path to a user's personal picture |
List<com.atlassian.user.User> |
getUsersWithConfluenceAccessAsList()
Deprecated. since 3.5.1. This method is very slow, use countUsersWithConfluenceAccess() if you need to know the number of users. |
List<com.atlassian.user.Group> |
getWriteableGroups()
Gets all editable groups. |
boolean |
isReadOnly(com.atlassian.user.Group group)
Returns true if the group cannot be modified or removed. |
boolean |
isReadOnly(com.atlassian.user.User user)
Returns true if the user cannot be modified or removed. |
boolean |
isSuperUser(com.atlassian.user.User user)
Deprecated. since 3.5 the permission checks in the application take care of checking for this membership |
void |
setUserProfilePicture(com.atlassian.user.User user,
Attachment attachment)
Set the user profile picture to the given attachment. |
void |
setUserProfilePicture(com.atlassian.user.User targetUser,
String imagePath)
Set the user profile picture to a built-in image. |
Methods inherited from interface com.atlassian.user.search.query.EntityQueryParser |
---|
findGroups, findGroups, findUsers |
Field Detail |
---|
@Deprecated static final String ANONYMOUS
static final String GROUP_CONFLUENCE_USERS
@Deprecated static final String USER_GROUP_SUFFIX
static final String GROUP_CONFLUENCE_ADMINS
static final List<String> DEFAULT_GROUP_NAMES
static final String PROFILE_PICTURE_BUILTIN_PATH
Method Detail |
---|
boolean isReadOnly(com.atlassian.user.User user)
true
if the user cannot be modified or removed. However, returning false
does
necessarily confirm that the user can be modified or removed. Depending on the user
management configuration, it is not always possible for Confluence to determine whether a user
is read-only.
In an internal-only user management configuration, this method always returns false
.
boolean isReadOnly(com.atlassian.user.Group group)
true
if the group cannot be modified or removed. However, returning false
does
necessarily confirm that the group can be modified or removed. Depending on the user
management configuration, it is not always possible for Confluence to determine whether a group
is read-only. Indeed, groups can span across multiple directories with different access control mechanisms,
so it may be possible to modify certain memberships of a group but not others.
In an internal-only user management configuration, this method always returns false
.
com.atlassian.user.search.page.Pager<com.atlassian.user.User> filterUnaccessibleUsers(com.atlassian.user.search.page.Pager<com.atlassian.user.User> userPager, com.atlassian.user.User user)
User
. If in "shared" mode
and the user isn't a global administrator, only users who are members of the same groups will be returned.
Otherwise, the pager will be returned unmodified.
userPager
- A Pager
of User
objectsuser
- The user to filter against
Pager
of User
objectscom.atlassian.user.search.page.Pager<com.atlassian.user.Group> filterUnaccessibleGroups(com.atlassian.user.search.page.Pager<com.atlassian.user.Group> groupPager, com.atlassian.user.User user)
User
. If in "shared" mode and the user isn't a global
administrator, only the groups of the user will be returned. Otherwise, the pager will be returned unmodified.
groupPager
- The pager of groupsuser
- The user to filter against
Pager
of Group
objects@Deprecated ProfilePictureInfo getUserProfilePicture(String username)
getUserProfilePicture(User)
instead.
username
- the user whose picture to look up.
ProfilePictureInfo getUserProfilePicture(com.atlassian.user.User user)
user
- the user whose picture to look up.
ConfluenceUserPreferences getConfluenceUserPreferences(com.atlassian.user.User user)
@Deprecated boolean isSuperUser(com.atlassian.user.User user)
user
- the user to check for (the null user will always return false
List<com.atlassian.user.User> filterUnaccessibleUsers(List<com.atlassian.user.User> groupList, com.atlassian.user.User user)
@Deprecated List<com.atlassian.user.Group> getGroupsAsList(com.atlassian.user.User user)
getGroupNames(User)
or getGroupNamesForUserName(String)
List<com.atlassian.user.Group> filterUnaccessibleGroups(List<com.atlassian.user.Group> groupList, com.atlassian.user.User user)
List<com.atlassian.user.Group> getGroupsAsList()
List<String> getMemberNamesAsList(com.atlassian.user.Group group)
UserAccessor.getMemberNames(com.atlassian.user.Group)
but returns a List of user names as String
s
rather than a Pager.
group
- to retrieve the member names from
String
sList<String> getGroupNames(com.atlassian.user.User user)
user
- the user to perform the membership check for
List<String> getGroupNamesForUserName(String userName)
userName
- the name of the user to perform the membership check for
List<com.atlassian.user.Group> getWriteableGroups()
Group
s that can be edited.@Deprecated List<com.atlassian.user.User> getUsersWithConfluenceAccessAsList()
countUsersWithConfluenceAccess()
if you need to know the number of users.
countUsersWithConfluenceAccess()
List<String> getUserNamesWithConfluenceAccess()
int countUsersWithConfluenceAccess()
com.atlassian.user.User getUserIfAvailable(String username)
User
if visible to the currently authenticated user in shared mode.
If not in shared mode, the User
will be returned if not null.
List<com.atlassian.user.User> findUsersAsList(com.atlassian.user.search.query.Query<com.atlassian.user.User> search) throws com.atlassian.user.EntityException
com.atlassian.user.EntityException
void setUserProfilePicture(com.atlassian.user.User user, Attachment attachment)
user
- the user to set a profile picture forattachment
- the attachment containing the user's profile picture
IllegalArgumentException
- if the image is not attached to the user's personal informationvoid setUserProfilePicture(com.atlassian.user.User targetUser, String imagePath)
targetUser
- the user to set a profile picture forimagePath
- the image path to that picture.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |