Backend: update custom role (metadata + permissions) endpoints

Open
#590 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start with ADR #469 for the endpoint definitions, then read the custom-roles model in #561 and the audit requirements in #587/#588. Implement both metadata and permission updates with transactional Casbin p row updates, enforcing superuser access, standard-role rejection, and dependency closure. Done means the acceptance cases pass, including rename, permission add/remove, dependency side effects, and audit events.

Written by the indexing model from the issue text.

Description

willow

Implement the update custom role endpoints defined in the ADR (#469):

  1. Metadata update — rename and edit the description (backs the inline pencil #578).
  2. Permission add/remove — change the role's granted permissions (backs the editable Permissions tab #577), applying dependency closure.

Both persist via the custom-roles model (#561) and re-render the affected Casbin p rows in the same transaction. Superuser-only. Standard roles are not editable (ADR 0021).

Acceptance
  • Metadata update enforces name uniqueness; description free-text stored as entered (not localized).
  • Permission add/remove updates role-permission + p rows transactionally; dependency closure enforced server-side.
  • Superuser-only; standard roles rejected.
  • Audit events recorded (see #587/#588); tests for rename, add-permission, remove-permission, and dependency side-effects.
Dominant language
Python
Stars
0
Forks
10
Avg merge
3d 4h
Merged PRs (30d)
20

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openedx/openedx-authz

All issues in openedx/openedx-authz

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.