com.atlassian.jira.bc.license
Class LicenseRoleAuthorizationServiceImpl

java.lang.Object
  extended by com.atlassian.jira.bc.license.LicenseRoleAuthorizationServiceImpl
All Implemented Interfaces:
LicenseRoleAuthorizationService

public class LicenseRoleAuthorizationServiceImpl
extends Object
implements LicenseRoleAuthorizationService


Constructor Summary
LicenseRoleAuthorizationServiceImpl(LicenseRoleManager licenseRoleManager, GroupManager groupManager)
           
 
Method Summary
 boolean isAuthenticated(ApplicationUser user, LicenseRoleId licenseRoleId)
          Returns true if the given user has the specified role and the role has an associated license installed.
 boolean isAuthenticated(LicenseRoleId licenseRoleId)
          Returns true if the given license role is present and licensed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseRoleAuthorizationServiceImpl

public LicenseRoleAuthorizationServiceImpl(LicenseRoleManager licenseRoleManager,
                                           GroupManager groupManager)
Method Detail

isAuthenticated

public boolean isAuthenticated(@Nullable
                               ApplicationUser user,
                               @Nonnull
                               LicenseRoleId licenseRoleId)
Description copied from interface: LicenseRoleAuthorizationService
Returns true if the given user has the specified role and the role has an associated license installed. This does not account for the number of license slots used or the license expiration date - only whether the license is present.

Specified by:
isAuthenticated in interface LicenseRoleAuthorizationService
Parameters:
user - the user to check for access rights - if this is null, this method returns false
licenseRoleId - the license role to check - if this is null, you'll get an exception :)
Returns:
true if the user has the specified role and the role is correctly licensed
See Also:
LicenseRoleService#userHasRole(ApplicationUser, LicenseRoleId)} for a method which does not check the license

isAuthenticated

public boolean isAuthenticated(@Nonnull
                               LicenseRoleId licenseRoleId)
Description copied from interface: LicenseRoleAuthorizationService
Returns true if the given license role is present and licensed. This does not account for the number of license slots used or the license expiration date - only whether the license is present.

Specified by:
isAuthenticated in interface LicenseRoleAuthorizationService
Parameters:
licenseRoleId - the role
Returns:
true if the given license role is present and licensed.
See Also:
com.atlassian.jira.license.JiraLicenseManager#isLicensed(LicenseRoleId)} which provides this functionality from 6.3


Copyright © 2002-2014 Atlassian. All Rights Reserved.