Sha256: 1f107d1d83ea13456419547f28e6cde3170d0968ce2079c355c0dc5773fb18ae

Contents?: true

Size: 796 Bytes

Versions: 34

Compression:

Stored size: 796 Bytes

Contents

# Injects behaviors into User model so that it will work with Hydra Access Controls
# By default, this module assumes you are using the User model created by Blacklight, which uses Devise.
# To integrate your own User implementation into Hydra, override this Module or define your own User model in app/models/user.rb within your Hydra head.
module Hydra::User
  
  def self.included(klass)
    # Other modules to auto-include
    klass.send(:include, Hydra::SuperuserAttributes)
  end

  # This method should display the unique identifier for this user
  # the unique identifier is what access controls will be enforced against. 
  def unique_id
    return to_s
  end

  # For backwards compatibility with the Rails2 User models in Hydra/Blacklight
  def login
    return unique_id
  end
  
end

Version data entries

34 entries across 34 versions & 1 rubygems

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