com.atlassian.jira.web.util
Class DefaultAuthorizationSupport

java.lang.Object
  extended by com.atlassian.jira.web.util.DefaultAuthorizationSupport
All Implemented Interfaces:
AuthorizationSupport

public class DefaultAuthorizationSupport
extends Object
implements AuthorizationSupport

Implementation of the authorization checks defined in AuthorizationSupport

Since:
v4.3

Constructor Summary
DefaultAuthorizationSupport(PermissionManager permissionManager, JiraAuthenticationContext jiraAuthenticationContext)
           
 
Method Summary
 boolean hasIssuePermission(int permissionsId, Issue issue)
          Returns true if the logged in user has the given permission type on the given Issue.
 boolean hasPermission(int permissionsId)
          Returns true if the logged in user has the given permission type.
 boolean hasProjectPermission(int permissionsId, Project project)
          Returns true if the logged in user has the given permission type on the given Project.
 boolean isHasIssuePermission(int permissionsId, org.ofbiz.core.entity.GenericValue issue)
          Returns true if the logged in user has the given permission type on the given Issue.
 boolean isHasIssuePermission(String permName, org.ofbiz.core.entity.GenericValue issue)
          Returns true if the logged in user has the given permission type on the given Issue.
 boolean isHasPermission(int permissionsId)
          Returns true if the logged in user has the given permission type.
 boolean isHasPermission(String permName)
          Returns true if the logged in user has the given permission type.
 boolean isHasPermission(String permName, org.ofbiz.core.entity.GenericValue entity)
          Deprecated. 
 boolean isHasProjectPermission(int permissionsId, org.ofbiz.core.entity.GenericValue project)
          Returns true if the logged in user has the given permission type on the given Project.
 boolean isHasProjectPermission(String permName, org.ofbiz.core.entity.GenericValue project)
          Returns true if the logged in user has the given permission type on the given Project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAuthorizationSupport

public DefaultAuthorizationSupport(PermissionManager permissionManager,
                                   JiraAuthenticationContext jiraAuthenticationContext)
Method Detail

isHasPermission

public boolean isHasPermission(String permName)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type.

Specified by:
isHasPermission in interface AuthorizationSupport
Parameters:
permName - the permission type
Returns:
true if the logged in user has the given permission type.

isHasPermission

public boolean isHasPermission(int permissionsId)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type.

Specified by:
isHasPermission in interface AuthorizationSupport
Parameters:
permissionsId - the permission type
Returns:
true if the logged in user has the given permission type.

hasPermission

public boolean hasPermission(int permissionsId)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type.

Specified by:
hasPermission in interface AuthorizationSupport
Parameters:
permissionsId - the permission type
Returns:
true if the logged in user has the given permission type.

isHasIssuePermission

public boolean isHasIssuePermission(String permName,
                                    org.ofbiz.core.entity.GenericValue issue)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type on the given Issue.

Specified by:
isHasIssuePermission in interface AuthorizationSupport
Parameters:
permName - the permission type
issue - the Issue
Returns:
true if the logged in user has the given permission type on the given Issue.

isHasIssuePermission

public boolean isHasIssuePermission(int permissionsId,
                                    org.ofbiz.core.entity.GenericValue issue)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type on the given Issue.

Specified by:
isHasIssuePermission in interface AuthorizationSupport
Parameters:
permissionsId - the permission type
issue - the Issue
Returns:
true if the logged in user has the given permission type on the given Issue.

hasIssuePermission

public boolean hasIssuePermission(int permissionsId,
                                  Issue issue)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type on the given Issue.

Specified by:
hasIssuePermission in interface AuthorizationSupport
Parameters:
permissionsId - the permission type
issue - the Issue
Returns:
true if the logged in user has the given permission type on the given Issue.

isHasProjectPermission

public boolean isHasProjectPermission(String permName,
                                      org.ofbiz.core.entity.GenericValue project)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type on the given Project.

Specified by:
isHasProjectPermission in interface AuthorizationSupport
Parameters:
permName - the permission type
project - the Project
Returns:
true if the logged in user has the given permission type on the given Project.

isHasProjectPermission

public boolean isHasProjectPermission(int permissionsId,
                                      org.ofbiz.core.entity.GenericValue project)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type on the given Project.

Specified by:
isHasProjectPermission in interface AuthorizationSupport
Parameters:
permissionsId - the permission type
project - the Project
Returns:
true if the logged in user has the given permission type on the given Project.

hasProjectPermission

public boolean hasProjectPermission(int permissionsId,
                                    Project project)
Description copied from interface: AuthorizationSupport
Returns true if the logged in user has the given permission type on the given Project.

Specified by:
hasProjectPermission in interface AuthorizationSupport
Parameters:
permissionsId - the permission type
project - the Project
Returns:
true if the logged in user has the given permission type on the given Project.

isHasPermission

@Deprecated
public boolean isHasPermission(String permName,
                                          org.ofbiz.core.entity.GenericValue entity)
Deprecated. 

Description copied from interface: AuthorizationSupport
Returns true if remote user has permission over given entity, false otherwise.

Specified by:
isHasPermission in interface AuthorizationSupport
Parameters:
permName - permission type
entity - entity to check the permission for, e.g. project, issue
Returns:
true if remote user has permission over given entity, false otherwise


Copyright © 2002-2014 Atlassian. All Rights Reserved.