Module: Ability::Shared::SuperUser
- Included in:
- Administrator
- Defined in:
- app/models/ability/shared/super_user.rb
Overview
Prepend to an ability class to include SUper User privileges These privileges should be restricted to PSD only in future Currently awarded to all admins
Instance Method Summary collapse
-
#grant_privileges ⇒ Object
rubocop:todo Metrics/MethodLength.
Instance Method Details
#grant_privileges ⇒ Object
rubocop:todo Metrics/MethodLength
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/models/ability/shared/super_user.rb', line 7 def grant_privileges # rubocop:todo Metrics/MethodLength super # More advanced user administration, such as the ability to add # and remove roles Rails.logger.debug { 'Granting SuperUser privileges' } can :manage, User # Changing help text can :manage, CustomText # Can edit existing plate purposes can :manage, [Purpose, PlatePurpose] can :manage, PlateTemplate can :manage, [Robot, RobotProperty] can :manage, FacultySponsor can :manage, ReferenceGenome can :manage, Role can %i[activate deactivate], Pipeline can :read, Ability end |