com.atlassian.jira.security.type
Class CurrentReporterHasCreatePermission

java.lang.Object
  extended by com.atlassian.jira.security.type.AbstractSecurityType
      extended by com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
          extended by com.atlassian.jira.security.type.CurrentReporterHasCreatePermission
All Implemented Interfaces:
SchemeType, SecurityType

public class CurrentReporterHasCreatePermission
extends AbstractIssueFieldSecurityType


Constructor Summary
CurrentReporterHasCreatePermission(JiraAuthenticationContext jiraAuthenticationContext)
           
 
Method Summary
 void doValidation(String key, Map parameters, JiraServiceContext jiraServiceContext)
           
 String getDisplayName()
           
protected  String getField()
           
protected  String getFieldName()
           
 String getType()
           
protected  boolean hasProjectPermission(User user, boolean issueCreation, org.ofbiz.core.entity.GenericValue gvProject)
           
 boolean isValidForPermission(int permissionId)
          Is valid for all permissions except "Create Issue".
 
Methods inherited from class com.atlassian.jira.security.type.AbstractIssueFieldSecurityType
getQuery, getQuery, getQueryForProject, getQueryForSecurityLevel, getUsers, hasIssuePermission, hasPermission, hasPermission
 
Methods inherited from class com.atlassian.jira.security.type.AbstractSecurityType
getArgumentDisplay
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CurrentReporterHasCreatePermission

public CurrentReporterHasCreatePermission(JiraAuthenticationContext jiraAuthenticationContext)
Method Detail

getDisplayName

public String getDisplayName()

getType

public String getType()

doValidation

public void doValidation(String key,
                         Map parameters,
                         JiraServiceContext jiraServiceContext)

isValidForPermission

public boolean isValidForPermission(int permissionId)
Is valid for all permissions except "Create Issue".

Because we rely on the permissions for the "Create Issue" function, then not only does it not make sense to add this role to "Create Issue", it would actually cause an infinite loop. see JRA-13315

Specified by:
isValidForPermission in interface SchemeType
Overrides:
isValidForPermission in class AbstractSecurityType
Parameters:
permissionId - permission id.
Returns:
false for Permissions.CREATE_ISSUE, true otherwise.
See Also:
CurrentReporterHasCreatePermission

getFieldName

protected String getFieldName()
Specified by:
getFieldName in class AbstractIssueFieldSecurityType

hasProjectPermission

protected boolean hasProjectPermission(User user,
                                       boolean issueCreation,
                                       org.ofbiz.core.entity.GenericValue gvProject)
Specified by:
hasProjectPermission in class AbstractIssueFieldSecurityType

getField

protected String getField()
Specified by:
getField in class AbstractIssueFieldSecurityType


Copyright © 2002-2008 Atlassian. All Rights Reserved.