FIX: can_admin_group should be true when creating a new group. (#13671)

It looks like this regressed in #10432.

A user can create a group if they're an admin or if they're a mod and the "moderators_manage_categories_and_groups" setting is enabled, so it's safe to always set "can_admin_group" to true for new groups.

It will let us configure automatic membership, default title, and effects on create.
This commit is contained in:
Roman Rizzi 2021-07-09 01:15:00 -03:00 committed by GitHub
parent 6ce0b57e1e
commit ba62ecac68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,11 @@ export default DiscourseRoute.extend({
},
model() {
return Group.create({ automatic: false, visibility_level: 0 });
return Group.create({
automatic: false,
visibility_level: 0,
can_admin_group: true,
});
},
setupController(controller, model) {