Skip to content

Frontend: Create Custom Role button + wizard page 1 (Name & Resource) #571

Done
openedx/frontend-app-admin-console
#293

Description

@rodmgwgu

Add the "Create Custom Role" header button on the Roles and Permissions view, opening the "Create a new role" dialog with a two-step stepper ("Name & Resource" -> "Permissions"). Build page 1:

  • Role name text field (helper: "Shown when administrators assign access.").
  • "Start from" — two selectable cards: "Start from scratch" (build from zero permissions) and "Clone from role" (start with an existing role's permissions).
  • Resource type dropdown (Course / Library), helper "Custom roles currently apply to a single resource type." Values from /scopes/. Shown only in the "Start from scratch" state.
  • When "Clone from role" is selected, the Resource-type dropdown is replaced by a grouped "Role" picker: a "Standard Roles" group sub-grouped by resource type (Course: Admin/Staff/Editor/Auditor; Library: Admin/Author/Contributor/User) and a "Custom Roles" group. Both standard and custom roles are cloneable. Cloning copies the source role's resource type and permissions; the resource type cannot be changed in clone mode. The selected role seeds page 2.
  • Next advances to Permissions; Cancel closes.

Acceptance

  • Role name required; a Start-from option required; in scratch mode resource type required; in clone mode a source role required and its resource type + permission set carried into page 2.
  • Grouped picker renders Standard (by resource type) and Custom groups.
  • Accessible stepper/dialog semantics.

Design: https://www.figma.com/design/xnmQJq1cTRVqNrs31R8zDM/AuthZ---v2?node-id=40000174-2&p=f&t=AfaPxKGH7lD48V93-0

Metadata

Metadata

Labels

willow

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions