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:
Thibaut Girka
2018-12-23 11:28:28 +01:00
168 changed files with 2873 additions and 1871 deletions
+4
View File
@@ -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