FIX: unable to create new categories

Previous attempt at 70adb940 missed the critical "everyone" group from
staff, leading to a case where staff was no longer able to create categories
This commit is contained in:
Sam
2019-02-15 10:24:29 +11:00
parent 0472bd4adc
commit f8b70f4ca3
5 changed files with 23 additions and 11 deletions

View File

@@ -72,9 +72,7 @@ class Site
end
def groups
groups = Group.visible_groups(@guardian.user)
groups = groups.where("automatic IS FALSE OR groups.id = #{Group::AUTO_GROUPS[:moderators]}") if !@guardian.is_staff?
groups
Group.visible_groups(@guardian.user, "name ASC", include_everyone: true)
end
def suppressed_from_latest_category_ids