Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - config/routes.rb Upstream changed some admin routes, conflict was because of an added :show action for statuses on our side. Kept it.
This commit is contained in:
@@ -9,6 +9,10 @@ class AccountPolicy < ApplicationPolicy
|
||||
staff?
|
||||
end
|
||||
|
||||
def warn?
|
||||
staff? && !record.user&.staff?
|
||||
end
|
||||
|
||||
def suspend?
|
||||
staff? && !record.user&.staff?
|
||||
end
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AccountWarningPresetPolicy < ApplicationPolicy
|
||||
def index?
|
||||
staff?
|
||||
end
|
||||
|
||||
def create?
|
||||
staff?
|
||||
end
|
||||
|
||||
def update?
|
||||
staff?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
staff?
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user