Sha256: 2750afd6008542c81df56104e6e9f534dcdf0d989bc182217d3cf3036bf04727
Contents?: true
Size: 627 Bytes
Versions: 18
Compression:
Stored size: 627 Bytes
Contents
module Abilities class ThecoreAuthCommons include CanCan::Ability def initialize user # Main abilities file for Thecore applications if user.present? # Users' abilities # - if user.admin? # Admins' abiities can :manage, :all # only allow admin users to access Rails Admin # prevents killing himself cannot :destroy, ::User do |u| u.id == user.id end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems