Class: Decidim::Sortitions::Permissions

Inherits:
DefaultPermissions show all
Defined in:
decidim-sortitions/app/permissions/decidim/sortitions/permissions.rb

Instance Method Summary collapse

Methods inherited from DefaultPermissions

#initialize

Constructor Details

This class inherits a constructor from Decidim::DefaultPermissions

Instance Method Details

#permissionsObject



6
7
8
9
10
11
12
# File 'decidim-sortitions/app/permissions/decidim/sortitions/permissions.rb', line 6

def permissions
  return permission_action unless user

  return Decidim::Sortitions::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin

  permission_action
end