From ba62ecac68d586467713dd0367d16792177bc05b Mon Sep 17 00:00:00 2001 From: Roman Rizzi Date: Fri, 9 Jul 2021 01:15:00 -0300 Subject: [PATCH] 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. --- app/assets/javascripts/discourse/app/routes/groups-new.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/routes/groups-new.js b/app/assets/javascripts/discourse/app/routes/groups-new.js index fe375c54595..810b31f26d1 100644 --- a/app/assets/javascripts/discourse/app/routes/groups-new.js +++ b/app/assets/javascripts/discourse/app/routes/groups-new.js @@ -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) {