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,7 +1,11 @@
class FileTemplatePolicy < AdminOnlyPolicy
def index?
admin? || teacher?
end
def show?
everyone
admin? || teacher?
end
def by_file_type?