Class: Decidim::Permissions

Inherits:
DefaultPermissions show all
Defined in:
decidim-core/app/permissions/decidim/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


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'decidim-core/app/permissions/decidim/permissions.rb', line 5

def permissions
  return permission_action unless permission_action.scope == :public

  read_public_pages_action?
  locales_action?
  component_public_action?
  search_scope_action?

  public_report_content_action?

  return permission_action unless user

  user_manager_permissions
  manage_self_user_action?
  authorization_action?
  follow_action?
  amend_action?
  notification_action?
  conversation_action?
  user_group_action?
  user_group_invitations_action?
  apply_endorsement_permissions if permission_action.subject == :endorsement

  permission_action
end