Skip to content

Task - RBAC AuthZ - Implement user assignments endpoint for Admin Console #230

@rodmgwgu

Description

@rodmgwgu

Related Discovery: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/6060310529/Spike+-+M2+-+Endpoints+for+new+Admin+Console+designs

Implement the user assignments endpoint to be used in the expanded user view or the user Audit view.

Spec:

GET /api/authz/v1/users/(username)/assignments/

  • Query params:
    • page_size: For pagination
    • page: For pagination
    • orgs: Comma separated list of orgs to filter by
    • roles: Comma separated list of roles to filter by
    • sort_by: role, org or scope
  • Needs to filter to only relevant assignments to orgs or scopes (courses or libraries) that the calling user has view access to

Response:

A list of user assignments, with the following fields:

  • is_superadmin
  • role
  • org
  • scope
  • permission_count

Special case:

Superadmin users (Django staff or superuser) automatically have access to everything, so if we query for a superadmin user, we'll get an extra entry indicating the superadmin status.

A superadmin response will have the following characteristics:

  • is_superadmin: always true
  • role: "django.staff" or "django.superuser", depending the kind of superadmin the user is.
  • org: always "*"
  • scope: always "*"
  • permission_count: always null

Metadata

Metadata

Assignees

Labels

verawoodReleased in Verawood

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions