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

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.

diff --git a/app/assets/javascripts/discourse/app/routes/groups-new.js b/app/assets/javascripts/discourse/app/routes/groups-new.js
index fe375c5..810b31f 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) {

GitHub sha: ba62ecac68d586467713dd0367d16792177bc05b

This commit appears in #13671 which was approved by blake. It was merged by tgxworld.