class OpenProject::GlobalRoles::PrincipalAllowanceEvaluator::Global

Public Instance Methods

global_granting_candidates() click to toggle source
# File lib/open_project/global_roles/principal_allowance_evaluator/global.rb, line 21
def global_granting_candidates
  @user.principal_roles
end
granted_for_global?(membership, action, options) click to toggle source
Calls superclass method
# File lib/open_project/global_roles/principal_allowance_evaluator/global.rb, line 14
def granted_for_global? membership, action, options
  return false unless membership.is_a?(PrincipalRole)
  granted = super

  granted ||= membership.role.allowed_to?(action).present?
end