Module: Hydra::SuperuserAttributes
- Defined in:
- vendor/plugins/hydra_repository/lib/hydra/superuser_attributes.rb
Instance Method Summary (collapse)
Instance Method Details
- (Boolean) can_be_superuser?
3 4 5 |
# File 'vendor/plugins/hydra_repository/lib/hydra/superuser_attributes.rb', line 3 def can_be_superuser? Superuser.find_by_user_id(self.id) ? true : false end |
- (Boolean) is_being_superuser?(session = nil)
7 8 9 10 |
# File 'vendor/plugins/hydra_repository/lib/hydra/superuser_attributes.rb', line 7 def is_being_superuser?(session=nil) return false if session.nil? session[:superuser_mode] ? true : false end |