Module: AnnotationSecurity::User
- Defined in:
- lib/annotation_security/includes/user.rb
Overview
AnnotationSecurity::User
This module should be included by the user domain class to enable full support of all features.
Instance Method Summary collapse
-
#==(obj) ⇒ Object
If
obj
is a UserWrapper, extract the user before comparing. -
#is_user?(user) ⇒ Boolean
Returns true if this is the user given as parameter.
Instance Method Details
#==(obj) ⇒ Object
If obj
is a UserWrapper, extract the user before comparing
22 23 24 25 |
# File 'lib/annotation_security/includes/user.rb', line 22 def ==(obj) obj = obj.__user__ if obj.is_a? AnnotationSecurity::UserWrapper super(obj) end |
#is_user?(user) ⇒ Boolean
Returns true if this is the user given as parameter.
Required to have a common interface with AnnotationSecurity::Role.
16 17 18 |
# File 'lib/annotation_security/includes/user.rb', line 16 def is_user?(user) self == user end |