mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: lounge category security settings won't be reset after an upgrade
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
unless Rails.env.test?
|
||||
lounge = Category.find_by(id: SiteSetting.lounge_category_id)
|
||||
if lounge and !lounge.group_ids.include?(Group[:trust_level_3].id)
|
||||
if lounge && lounge.created_at == lounge.updated_at &&
|
||||
!lounge.group_ids.include?(Group[:trust_level_3].id)
|
||||
|
||||
# The category for users with trust level 3 has been created.
|
||||
# Add permissions and a description to it.
|
||||
# Add initial permissions and description. They can be changed later.
|
||||
|
||||
Category.transaction do
|
||||
lounge.group_names = ['trust_level_3']
|
||||
|
||||
Reference in New Issue
Block a user