com.atlassian.sal.bamboo.user
Class BambooSalUserManager

java.lang.Object
  extended by com.atlassian.sal.bamboo.user.BambooSalUserManager
All Implemented Interfaces:
UserManager

public class BambooSalUserManager
extends Object
implements UserManager


Constructor Summary
BambooSalUserManager(com.atlassian.bamboo.user.BambooUserManager bambooUserManager, com.atlassian.bamboo.security.BambooPermissionManager bambooPermissionManager)
           
 
Method Summary
 boolean authenticate(String username, String password)
          Given a usernamen & password, this method checks whether or not the provided user can be authenticated
 String getRemoteUsername()
          Returns the username of the currently logged in user or null if no user can be found.
 String getRemoteUsername(javax.servlet.http.HttpServletRequest httpServletRequest)
          Returns the username of the currently logged in user or null if no user can be found.
 UserProfile getUserProfile(String username)
          Returns a UserProfile object for the specified user or null if no user can be found
 boolean isAdmin(String username)
          Returns true or false depending on whether a user has been granted the admin permission
 boolean isSystemAdmin(String username)
          Returns true or false depending on whether a user has been granted the system admin permission.
 boolean isUserInGroup(String username, String group)
          Returns whether the user is in the specify group
 Principal resolve(String username)
          Returns the user that made this request or null if this application does not have such a user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BambooSalUserManager

public BambooSalUserManager(com.atlassian.bamboo.user.BambooUserManager bambooUserManager,
                            com.atlassian.bamboo.security.BambooPermissionManager bambooPermissionManager)
Method Detail

getRemoteUsername

public String getRemoteUsername()
Description copied from interface: UserManager
Returns the username of the currently logged in user or null if no user can be found. If possible, please use UserManager.getRemoteUsername(HttpServletRequest).

Specified by:
getRemoteUsername in interface UserManager
Returns:
The user name of the logged in user or null

getRemoteUsername

public String getRemoteUsername(javax.servlet.http.HttpServletRequest httpServletRequest)
Description copied from interface: UserManager
Returns the username of the currently logged in user or null if no user can be found.

Specified by:
getRemoteUsername in interface UserManager
Parameters:
httpServletRequest - The request to retrieve the username from
Returns:
The user name of the logged in user or null

isUserInGroup

public boolean isUserInGroup(String username,
                             String group)
Description copied from interface: UserManager
Returns whether the user is in the specify group

Specified by:
isUserInGroup in interface UserManager
Parameters:
username - The username to check
group - The group to check
Returns:
true if the user is in the specified group

isSystemAdmin

public boolean isSystemAdmin(String username)
Description copied from interface: UserManager
Returns true or false depending on whether a user has been granted the system admin permission.

Specified by:
isSystemAdmin in interface UserManager
Parameters:
username - The username of the user to check
Returns:
true or false depending on whether a user has been granted the system admin permission.

getUserProfile

public UserProfile getUserProfile(String username)
Description copied from interface: UserManager
Returns a UserProfile object for the specified user or null if no user can be found

Specified by:
getUserProfile in interface UserManager
Parameters:
username - The username of the user whose profile is requested
Returns:
The user's profile or null

isAdmin

public boolean isAdmin(String username)
Description copied from interface: UserManager
Returns true or false depending on whether a user has been granted the admin permission

Specified by:
isAdmin in interface UserManager
Parameters:
username - The username of the user to check
Returns:
true or false depending on whether the user has been granted the admin permission

resolve

public Principal resolve(String username)
                  throws UserResolutionException
Description copied from interface: UserManager
Returns the user that made this request or null if this application does not have such a user.

Specified by:
resolve in interface UserManager
Parameters:
username - Username of the user a consumer is making a request on behalf of
Returns:
Principal corresponding to the username, null if the user does not exist
Throws:
UserResolutionException - thrown if there is a problem resolving the user, such as a failure when accessing an external user store

authenticate

public boolean authenticate(String username,
                            String password)
Description copied from interface: UserManager
Given a usernamen & password, this method checks whether or not the provided user can be authenticated

Specified by:
authenticate in interface UserManager
Parameters:
username - Username of the user
password - Password of the user
Returns:
true if the user can be authenticated, false otherwise


Copyright © 2010 Atlassian. All Rights Reserved.