Class: OpenWFE::DefaultAuthSystem
- Inherits:
-
Object
- Object
- OpenWFE::DefaultAuthSystem
- Defined in:
- lib/openwfe/worklist/worklist.rb
Instance Method Summary collapse
- #authenticate(user, pass) ⇒ Object
- #authorized?(user, store_name, action) ⇒ Boolean
-
#initialize(hash = nil) ⇒ DefaultAuthSystem
constructor
A new instance of DefaultAuthSystem.
Constructor Details
#initialize(hash = nil) ⇒ DefaultAuthSystem
Returns a new instance of DefaultAuthSystem.
276 277 278 |
# File 'lib/openwfe/worklist/worklist.rb', line 276 def initialize (hash=nil) @hash = hash end |
Instance Method Details
#authenticate(user, pass) ⇒ Object
280 281 282 283 |
# File 'lib/openwfe/worklist/worklist.rb', line 280 def authenticate (user, pass) return true unless @hash pass == @hash[user] end |
#authorized?(user, store_name, action) ⇒ Boolean
285 286 287 288 |
# File 'lib/openwfe/worklist/worklist.rb', line 285 def (user, store_name, action) return true unless @hash @hash[user] != nil end |