DEV: Remove fabrication hack for staff (#19528)
This commit is contained in:
parent
8820e9418a
commit
269b6177c1
|
@ -54,8 +54,7 @@ Fabricator(:moderator, from: :user) do
|
|||
|
||||
after_create do |user|
|
||||
user.group_users << Fabricate(:group_user, user: user, group: Group[:moderators])
|
||||
# HACK: Some plugins add the user to staff group already which breaks because of duplication
|
||||
user.group_users << Fabricate(:group_user, user: user, group: Group[:staff]) if group_users.none? { |gu| gu.group == Group[:staff] }
|
||||
user.group_users << Fabricate(:group_user, user: user, group: Group[:staff])
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -67,8 +66,7 @@ Fabricator(:admin, from: :user) do
|
|||
|
||||
after_create do |user|
|
||||
user.group_users << Fabricate(:group_user, user: user, group: Group[:admins])
|
||||
# HACK: Some plugins add the user to staff group already which breaks because of duplication
|
||||
user.group_users << Fabricate(:group_user, user: user, group: Group[:staff]) if group_users.none? { |gu| gu.group == Group[:staff] }
|
||||
user.group_users << Fabricate(:group_user, user: user, group: Group[:staff])
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue