Fix #3842: Mods can demote other mods or admins.

This commit is contained in:
evazion
2018-08-25 13:52:50 -05:00
parent 0bb787d987
commit 3dafca9aec
7 changed files with 1 additions and 111 deletions

View File

@@ -135,22 +135,6 @@ class User < ApplicationRecord
end
end
module InvitationMethods
def invite!(level, can_upload_free)
if can_upload_free
self.can_upload_free = true
else
self.can_upload_free = false
end
if level.to_i <= Levels::BUILDER
self.level = level
self.inviter_id = CurrentUser.id
save
end
end
end
module NameMethods
extend ActiveSupport::Concern
@@ -909,7 +893,6 @@ class User < ApplicationRecord
include BlacklistMethods
include ForumMethods
include LimitMethods
include InvitationMethods
include ApiMethods
include CountMethods
extend SearchMethods