Class: Relation::Public
- Defined in:
- app/models/relation/public.rb
Constant Summary
Constants inherited from Relation
Instance Method Summary collapse
-
#<=>(relation) ⇒ Object
A public relation is always the weakest.
-
#allow?(user, action, object) ⇒ Boolean
Are we supporting custom permissions for Public? Not by the moment.
Methods inherited from Single
Methods inherited from Relation
allow, allow?, #mode, negative_names, normalize, normalize_id, #positive?, positive_names
Instance Method Details
#<=>(relation) ⇒ Object
A public relation is always the weakest
3 4 5 |
# File 'app/models/relation/public.rb', line 3 def <=>(relation) 1 end |
#allow?(user, action, object) ⇒ Boolean
Are we supporting custom permissions for Relation::Public? Not by the moment.
8 9 10 |
# File 'app/models/relation/public.rb', line 8 def allow?(user, action, object) action == 'read' && object == 'activity' end |