add role teacher to file_type_policy

This commit is contained in:
yqbk
2016-05-31 18:25:28 +02:00
parent 8896a3aa18
commit 01fc6fcc90

View File

@ -3,4 +3,9 @@ class FileTypePolicy < AdminOnlyPolicy
@user == @record.author
end
private :author?
[:create?, :index?, :new?].each do |action|
define_method(action) { admin? || teacher? }
end
end