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:
Sam
2017-07-03 15:26:46 -04:00
parent c79418d334
commit 845170bd6b
17 changed files with 248 additions and 117 deletions

View File

@@ -4,7 +4,7 @@ export default Discourse.Route.extend({
model(params) {
if (params.name === 'new') {
return Group.create({ automatic: false, visible: true });
return Group.create({ automatic: false, visibility_level: 0 });
}
const group = this.modelFor('adminGroupsType').findBy('name', params.name);