implemented partial batch update for exercises

This commit is contained in:
Hauke Klement
2015-03-12 11:05:11 +01:00
parent f1de18141a
commit 6ee0b6bf81
9 changed files with 105 additions and 4 deletions

View File

@ -4,6 +4,10 @@ class ExercisePolicy < AdminOrAuthorPolicy
end
private :author?
def batch_update?
admin?
end
[:clone?, :destroy?, :edit?, :show?, :statistics?, :update?].each do |action|
define_method(action) { admin? || author? || team_member? }
end