Sha256: a2378094b8b6f5c33ef41d39697762e217811620f59b4c30037db1bdcb920ac4
Contents?: true
Size: 595 Bytes
Versions: 14
Compression:
Stored size: 595 Bytes
Contents
# frozen_string_literal: true module Decidim module Surveys class Permissions < Decidim::DefaultPermissions def permissions return permission_action unless user return Decidim::Surveys::Admin::Permissions.new(user, permission_action, context).permissions if permission_action.scope == :admin return permission_action if permission_action.scope != :public return permission_action if permission_action.subject != :survey permission_action.allow! if permission_action.action == :answer permission_action end end end end
Version data entries
14 entries across 14 versions & 1 rubygems