Sha256: a381b312b9fdf8bc40978c857dd9ac3d47d40621e2b26c75b35548bac23c046f
Contents?: true
Size: 595 Bytes
Versions: 13
Compression:
Stored size: 595 Bytes
Contents
module Abilities class ThecoreUiRailsAdmin include CanCan::Ability def initialize user # No one is allowed to add or destroy settings # just list or edit existing cannot [:create, :destroy, :show], ThecoreSettings::Setting cannot [:destroy, :update, :edit, :show], Action # Main abilities file for Thecore applications if user.present? # Users' abilities if user.admin? # Admins' abilities end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems