mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 05:25:16 -05:00
FEATURE: add support for group visibility level
There are 4 visibility levels - public (default) - members only - staff - owners Note, admins and group owners ALWAYS have visibility to groups Migration treated old "non public" as "members only"
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class AddVisibilityLevelToGroups < ActiveRecord::Migration
|
||||
def change
|
||||
|
||||
add_column :groups, :visibility_level, :integer, default: 0, null: false
|
||||
execute <<~SQL
|
||||
UPDATE groups
|
||||
SET visibility_level = 1
|
||||
WHERE NOT visible
|
||||
SQL
|
||||
remove_column :groups, :visible
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user