Sha256: 18286440d9729965099a6035072a8343ad32f50ce49824b81d54efcc80ca6235

Contents?: true

Size: 520 Bytes

Versions: 6

Compression:

Stored size: 520 Bytes

Contents

# @deprecated no longer doing permissions this way.  Will be removed no later than release 6.x
require 'deprecation'
module Hydra::SuperuserAttributes
  extend Deprecation

  self.deprecation_horizon = 'hydra-head 5.x'

  def can_be_superuser?
    Superuser.find_by_user_id(self.id) ? true : false
  end
  deprecation_deprecate :can_be_superuser?

  def is_being_superuser?(session=nil)
    return false if session.nil?
    session[:superuser_mode] ? true : false
  end
  deprecation_deprecate :is_being_superuser?

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hydra-head-4.1.3 lib/hydra/superuser_attributes.rb
hydra-head-4.1.2 lib/hydra/superuser_attributes.rb
hydra-head-4.1.1 lib/hydra/superuser_attributes.rb
hydra-head-4.1.0 lib/hydra/superuser_attributes.rb
hydra-head-4.0.3 lib/hydra/superuser_attributes.rb
hydra-head-4.0.2 lib/hydra/superuser_attributes.rb