Class: Decidim::DirectVerifications::Verification::Admin::Permissions

Inherits:
Decidim::DefaultPermissions
  • Object
show all
Defined in:
app/permissions/decidim/direct_verifications/verification/admin/permissions.rb

Overview

Defines the abilities related to direct_verifications for a logged in admin user.

Instance Method Summary collapse

Instance Method Details

#permissionsObject



9
10
11
12
13
14
15
# File 'app/permissions/decidim/direct_verifications/verification/admin/permissions.rb', line 9

def permissions
  return permission_action if permission_action.scope != :admin
  if user.organization.available_authorizations.include?("direct_verifications")
    allow! if permission_action.subject == Decidim::DirectVerifications::UserProcessor
    permission_action
  end
end