add role teacher to file_type_policy
This commit is contained in:
@ -3,4 +3,9 @@ class FileTypePolicy < AdminOnlyPolicy
|
|||||||
@user == @record.author
|
@user == @record.author
|
||||||
end
|
end
|
||||||
private :author?
|
private :author?
|
||||||
|
|
||||||
|
[:create?, :index?, :new?].each do |action|
|
||||||
|
define_method(action) { admin? || teacher? }
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user