Class VotePermissionChecker

java.lang.Object
com.atlassian.jira.jql.permission.VotePermissionChecker
All Implemented Interfaces:
ClausePermissionChecker

public class VotePermissionChecker extends Object implements ClausePermissionChecker
Checks if votes are enabled.
Since:
v4.0
  • Constructor Details

    • VotePermissionChecker

      public VotePermissionChecker(VoteManager voteManager)
  • Method Details

    • hasPermissionToUseClause

      public boolean hasPermissionToUseClause(ApplicationUser 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.
    • hasPermissionToUseClause

      public boolean hasPermissionToUseClause(ApplicationUser searcher, Set<FieldLayout> fieldLayouts)
      Description copied from interface: ClausePermissionChecker
      Checks to see that the provided user is able to use the clause. This method provides all the FieldLayouts visible to the given user as a shortcut otherwise individual checkers can end up looking this up dozens or even hundreds of times with causes slow downs in our search (see JRADEV-15665).
      Specified by:
      hasPermissionToUseClause in interface ClausePermissionChecker
      Parameters:
      searcher - to check permissions against.
      fieldLayouts - The field Layouts available to the given user (value of
      invalid reference
      com.atlassian.jira.issue.fields.FieldManager#getVisibleFieldLayouts(User)
      .
      Returns:
      true if the user can use this clause, false otherwise.