Add description column for custom roles
What does this MR do and why?
On the Settings
-> Roles and Permissions
page, we have an old version of the page (on production) and a new version (in development):
Old page | New page |
---|---|
This MR does the following:
- On the old page, the
description
column was added, to match the columns on the new page. - On both pages, when there is no description,
No description
is shown instead of nothing.
Old page:
Before | After |
---|---|
New page:
Before | After |
---|---|
How to set up and validate locally
- Go to any top level group,
Settings
->Roles and Permissions
. - Click on
Add new role
on the upper right. Fill out the form to create a role. Fill out the description. - Create another row, this time with no description.
- Verify that in the table, the description shows for the first created role, and
No description
shows for the second created role. - Apply this patch to switch to the new version of the page:
Patch
Index: ee/app/assets/javascripts/pages/admin/application_settings/roles_and_permissions/index.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/ee/app/assets/javascripts/pages/admin/application_settings/roles_and_permissions/index.js b/ee/app/assets/javascripts/pages/admin/application_settings/roles_and_permissions/index.js
--- a/ee/app/assets/javascripts/pages/admin/application_settings/roles_and_permissions/index.js (revision b075421643ab545cfee6ed1c20d3a71f309bb6a8)
+++ b/ee/app/assets/javascripts/pages/admin/application_settings/roles_and_permissions/index.js (date 1710884444267)
@@ -1,3 +1,4 @@
-import { initRolesAndPermissions } from 'ee/roles_and_permissions';
+import { initRolesAndPermissions, initCustomRolesApp } from 'ee/roles_and_permissions';
-initRolesAndPermissions();
+initCustomRolesApp();
+// initRolesAndPermissions();
Index: ee/app/assets/javascripts/pages/groups/settings/roles_and_permissions/index.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/ee/app/assets/javascripts/pages/groups/settings/roles_and_permissions/index.js b/ee/app/assets/javascripts/pages/groups/settings/roles_and_permissions/index.js
--- a/ee/app/assets/javascripts/pages/groups/settings/roles_and_permissions/index.js (revision b075421643ab545cfee6ed1c20d3a71f309bb6a8)
+++ b/ee/app/assets/javascripts/pages/groups/settings/roles_and_permissions/index.js (date 1710884444283)
@@ -1,3 +1,4 @@
-import { initRolesAndPermissions } from 'ee/roles_and_permissions';
+import { initRolesAndPermissions, initCustomRolesApp } from 'ee/roles_and_permissions';
-initRolesAndPermissions();
+initCustomRolesApp();
+// initRolesAndPermissions();
- Verify that the description column shows the correct text as in step 4.
Related to #451024 (closed)
Edited by Daniel Tian