Fix #4541: Possible to create new user while logged in.

This commit is contained in:
evazion
2020-07-13 19:08:45 -05:00
parent ed79b623cc
commit 7f2eaeb02b
2 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,6 @@
class UserPolicy < ApplicationPolicy
def create?
!sockpuppet?
user.is_anonymous? && !sockpuppet?
end
def update?