DEV: move post flags into database (#27125)

This is preparation for a feature that will allow admins to define their custom flags. Current behaviour should stay untouched.
This commit is contained in:
Krzysztof Kotlarek
2024-05-23 12:19:07 +10:00
committed by GitHub
parent 312a930ac8
commit cfbbfd177c
30 changed files with 380 additions and 104 deletions

View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
module FlagGuardian
def can_edit_flag?(flag)
@user.admin? && !flag.system? && !flag.used?
end
end