Class: Skr::NullUser
- Inherits:
-
Object
- Object
- Skr::NullUser
- Defined in:
- lib/skr/null_user.rb
Overview
Implements the interface for a User model in Stockor This implementation grants access to everything
Instance Method Summary collapse
-
#can_delete?(type, model) ⇒ Boolean
Can the User delete the model?.
-
#can_read?(model, attribute = nil) ⇒ Boolean
Can the User view the model?.
-
#can_write?(model, attribute = nil) ⇒ Boolean
Can the User create and update the model?.
-
#id ⇒ Object
Used to track created_by and updated_by.
Instance Method Details
#can_delete?(type, model) ⇒ Boolean
Returns Can the User delete the model?.
26 27 28 |
# File 'lib/skr/null_user.rb', line 26 def can_delete?(type, model) true end |
#can_read?(model, attribute = nil) ⇒ Boolean
Returns Can the User view the model?.
13 14 15 |
# File 'lib/skr/null_user.rb', line 13 def can_read?( model, attribute=nil) true end |
#can_write?(model, attribute = nil) ⇒ Boolean
Returns Can the User create and update the model?.
20 21 22 |
# File 'lib/skr/null_user.rb', line 20 def can_write?(model, attribute=nil) true end |
#id ⇒ Object
Used to track created_by and updated_by
7 8 9 |
# File 'lib/skr/null_user.rb', line 7 def id 0 end |