add role teacher to file_type_policy
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user