Hide file types, execution environments, and teams from teachers
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
class ExecutionEnvironmentPolicy < AdminOrAuthorPolicy
|
||||
class ExecutionEnvironmentPolicy < AdminOnlyPolicy
|
||||
def author?
|
||||
@user == @record.author
|
||||
end
|
||||
|
@ -1,4 +1,4 @@
|
||||
class FileTypePolicy < AdminOrAuthorPolicy
|
||||
class FileTypePolicy < AdminOnlyPolicy
|
||||
def author?
|
||||
@user == @record.author
|
||||
end
|
||||
|
@ -1,6 +1,6 @@
|
||||
class TeamPolicy < ApplicationPolicy
|
||||
[:create?, :index?, :new?].each do |action|
|
||||
define_method(action) { @user.internal_user? }
|
||||
define_method(action) { admin? }
|
||||
end
|
||||
|
||||
[:destroy?, :edit?, :show?, :update?].each do |action|
|
||||
|
Reference in New Issue
Block a user