Class: Decidim::DefaultPermissions

Inherits:
Object
  • Object
show all
Defined in:
decidim-core/app/permissions/decidim/default_permissions.rb

Overview

Default permissions class for all components and spaces. It disauthorizes all actions by any kind of user. Also works as a default implementation so other components can inherit from it and get some cenvenience methods.

Instance Method Summary collapse

Constructor Details

#initialize(user, permission_action, context = {}) ⇒ DefaultPermissions

Returns a new instance of DefaultPermissions.



8
9
10
11
12
# File 'decidim-core/app/permissions/decidim/default_permissions.rb', line 8

def initialize(user, permission_action, context = {})
  @user = user
  @permission_action = permission_action
  @context = context
end

Instance Method Details

#permissionsObject



14
15
16
# File 'decidim-core/app/permissions/decidim/default_permissions.rb', line 14

def permissions
  permission_action
end