Sha256: fba0e0019cc0b2395b6de708574d982a21f336721aadf2c4bad2f6df0f5435a8
Contents?: true
Size: 747 Bytes
Versions: 2
Compression:
Stored size: 747 Bytes
Contents
# Injects behaviors into User model so that it will work with # Blacklight 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 Blacklight, # override this module or define your own User model in # app/models/user.rb within your Blacklight application. module Blacklight module AccessControls module User extend ActiveSupport::Concern # This method should display the unique identifier for # this user as defined by devise. The unique identifier # is what access controls will be enforced against. def user_key send(Devise.authentication_keys.first) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
blacklight-access_controls-0.2.0 | lib/blacklight/access_controls/user.rb |
blacklight-access_controls-0.1.0 | lib/blacklight/access_controls/user.rb |