Module: Card::Set::All::Permissions::Follow
- Included in:
- Right::Follow
- Defined in:
- tmpsets/set/mod001-core/all/permissions.rb
Instance Method Summary collapse
- #ok_to_create ⇒ Object
- #ok_to_delete ⇒ Object
- #ok_to_update ⇒ Object
- #permit(action, verb = nil) ⇒ Object
Instance Method Details
#ok_to_create ⇒ Object
299 300 301 |
# File 'tmpsets/set/mod001-core/all/permissions.rb', line 299 def ok_to_create permit :create end |
#ok_to_delete ⇒ Object
303 304 305 |
# File 'tmpsets/set/mod001-core/all/permissions.rb', line 303 def ok_to_delete permit :delete end |
#ok_to_update ⇒ Object
295 296 297 |
# File 'tmpsets/set/mod001-core/all/permissions.rb', line 295 def ok_to_update permit :update end |
#permit(action, verb = nil) ⇒ Object
307 308 309 310 311 312 313 314 |
# File 'tmpsets/set/mod001-core/all/permissions.rb', line 307 def permit action, verb=nil if [:create, :delete, :update].include?(action) && Auth.signed_in? && (user = rule_user) && Auth.current_id == user.id return true else super action, verb end end |