Class: Decidim::DefaultPermissions

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

Overview

Default permissions class for all components and spaces. It deauthorizes all actions by any kind of user. Also works as a default implementation so other components can inherit from it and get some convenience 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 '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 'app/permissions/decidim/default_permissions.rb', line 14

def permissions
  permission_action
end