Class: MigrationExecutionPolicy::Scope
- Inherits:
-
Scope
- Object
- Scope
- MigrationExecutionPolicy::Scope
- Defined in:
- app/policies/migration_execution_policy.rb
Instance Method Summary collapse
Instance Method Details
#resolve ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/policies/migration_execution_policy.rb', line 25 def resolve if user.viewer? scope.where(status: i[completed failed]) # Viewers only see finished executions else scope.all # Operators and admins see everything including running end end |