Class: Decidim::ReportUserPermissions

Inherits:
DefaultPermissions show all
Defined in:
app/permissions/decidim/report_user_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
# File 'app/permissions/decidim/report_user_permissions.rb', line 5

def permissions
  return permission_action unless user

  allow! if permission_action.subject == :user_report && permission_action.action == :create

  permission_action
end