Sha256: d27371361107ebc36adb7c972b23740b270827c5c3100339bba62642c29038af

Contents?: true

Size: 246 Bytes

Versions: 34

Compression:

Stored size: 246 Bytes

Contents

module Hydra::SuperuserAttributes

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

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

end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
hydra-head-4.0.0 lib/hydra/superuser_attributes.rb
hydra-head-4.0.0.rc6 lib/hydra/superuser_attributes.rb
hydra-head-4.0.0.rc5 lib/hydra/superuser_attributes.rb
hydra-head-4.0.0.rc4 lib/hydra/superuser_attributes.rb
hydra-head-4.0.0.rc3 lib/hydra/superuser_attributes.rb
hydra-head-4.0.0.rc2 lib/hydra/superuser_attributes.rb
hydra-head-3.3.0 lib/hydra/superuser_attributes.rb
hydra-head-3.2.2 lib/hydra/superuser_attributes.rb
hydra-head-3.2.1 lib/hydra/superuser_attributes.rb
hydra-head-3.2.0 lib/hydra/superuser_attributes.rb
hydra-head-3.2.0.pre3 lib/hydra/superuser_attributes.rb
hydra-head-3.2.0.pre2 lib/hydra/superuser_attributes.rb
hydra-head-3.2.0.pre1 lib/hydra/superuser_attributes.rb
hydra-head-3.1.5 lib/hydra/superuser_attributes.rb
hydra-head-3.1.4 lib/hydra/superuser_attributes.rb
hydra-head-3.1.3 lib/hydra/superuser_attributes.rb
hydra-head-3.1.2 lib/hydra/superuser_attributes.rb
hydra-head-3.1.1 lib/hydra/superuser_attributes.rb
hydra-head-3.1.0 lib/hydra/superuser_attributes.rb
hydra-head-3.1.0.rc2 lib/hydra/superuser_attributes.rb