Sha256: e311cd2a5a08c9521a1774bc359ffab837f2bba5fb9eb6d68b3fe0f0aea46196
Contents?: true
Size: 471 Bytes
Versions: 2
Compression:
Stored size: 471 Bytes
Contents
# frozen_string_literal: true module Decidim module Calendar module Admin class Permissions < Decidim::DefaultPermissions def permissions return permission_action unless user return permission_action unless permission_action.scope == :admin unless user.admin? disallow! return permission_action end allow! permission_action end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
decidim-calendar-0.19.0 | app/permissions/decidim/calendar/admin/permissions.rb |
decidim-calendar-0.13.1.3 | app/permissions/decidim/calendar/admin/permissions.rb |