com.atlassian.jira.jql.permission
Class CustomFieldClausePermissionChecker

java.lang.Object
  extended by com.atlassian.jira.jql.permission.CustomFieldClausePermissionChecker
All Implemented Interfaces:
ClausePermissionChecker

@NonInjectableComponent
public class CustomFieldClausePermissionChecker
extends Object
implements ClausePermissionChecker

A clause permission checker for custom fields that will check the users permission to see the field and also that the user has permission to see at least one context on the custom field.

Since:
v4.0

Nested Class Summary
static class CustomFieldClausePermissionChecker.DefaultFactory
          This is a factory so that we don't have a circular dependency on the Field manager.
static interface CustomFieldClausePermissionChecker.Factory
           
 
Constructor Summary
CustomFieldClausePermissionChecker(CustomField field, FieldManager fieldManager, FieldConfigSchemeClauseContextUtil clauseContextUtil)
           
 
Method Summary
 boolean hasPermissionToUseClause(User user)
          Checks to see that the provided user is able to use the clause.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomFieldClausePermissionChecker

public CustomFieldClausePermissionChecker(CustomField field,
                                          FieldManager fieldManager,
                                          FieldConfigSchemeClauseContextUtil clauseContextUtil)
Method Detail

hasPermissionToUseClause

public boolean hasPermissionToUseClause(User user)
Description copied from interface: ClausePermissionChecker
Checks to see that the provided user is able to use the clause. This may be as simple as determining if the user has permission to see the field that the clause represents.

Specified by:
hasPermissionToUseClause in interface ClausePermissionChecker
Parameters:
user - to check permissions against.
Returns:
true if the user can use this clause, false otherwise.


Copyright © 2002-2009 Atlassian. All Rights Reserved.