Rethink permissions in CodeOcean for usage in schools and adopt views

This commit is contained in:
Sebastian Serth
2018-11-27 17:05:38 +01:00
parent 7a63a9c1c1
commit d3f67ab4c7
17 changed files with 47 additions and 76 deletions

View File

@ -1,9 +1,4 @@
class ExercisePolicy < AdminOrAuthorPolicy
def author?
@user == @record.author
end
private :author?
def batch_update?
admin?
end