Class: QueueItemPolicy

Inherits:
ResourcePolicy show all
Defined in:
app/policies/queue_item_policy.rb

Instance Attribute Summary

Attributes inherited from ResourcePolicy

#resource, #user

Instance Method Summary collapse

Methods inherited from ResourcePolicy

#authorize!, #destroy?, #initialize, #update?

Constructor Details

This class inherits a constructor from ResourcePolicy

Instance Method Details

#show?Boolean

Returns:

  • (Boolean)

5
6
7
# File 'app/policies/queue_item_policy.rb', line 5

def show?
  user&.admin? || resource&.user == user
end