Skip to content

Commit 3cc245d

Browse files
authored
fix(admin): update edit roles UI (#3502)
* Hide role IDs in the list role administration page * Restrict role edits to description changes only as Role name and ID are now unified.
1 parent 4e2fc9b commit 3cc245d

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • invenio_app_rdm/administration/roles

invenio_app_rdm/administration/roles/roles.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: 2025 CERN.
2-
# SPDX-FileCopyrightText: 2025 KTH Royal Institute of Technology.
2+
# SPDX-FileCopyrightText: 2025-2026 KTH Royal Institute of Technology.
33
# SPDX-License-Identifier: MIT
44

55
"""Administration views for managing roles."""
@@ -56,7 +56,6 @@ class RolesListView(RoleAdminMixin, AdminResourceListView):
5656

5757
item_field_list = {
5858
"name": {"text": _("Name"), "order": 0, "width": 3},
59-
"id": {"text": _("ID"), "order": 1, "width": 3},
6059
"description": {"text": _("Description"), "order": 2, "width": 5},
6160
"is_managed": {"text": _("Managed"), "order": 3, "width": 1},
6261
"created": {"text": _("Created"), "order": 4, "width": 2},
@@ -109,4 +108,9 @@ class RolesEditView(RoleAdminMixin, AdminResourceEditView):
109108
url = "/roles/<pid_value>/edit"
110109
title = _("Edit role")
111110

112-
form_fields = RolesCreateView.form_fields
111+
form_fields = {
112+
"description": {
113+
"order": 1,
114+
"text": _("Description"),
115+
},
116+
}

0 commit comments

Comments
 (0)