Skip to content

Improve the enforcement calls in the code #104

@MaferMazu

Description

@MaferMazu

Description

I just noticed that we don't have an "elegant" way to check the permissions for the edx-platform endpoints.
We have the decorator and the permission classes, but they are only for the authz rest_api. So the checks in edx-platform are only booleans (they don't manage permission-denied responses).

We will need a way to use this enforcement and manage permission-denied situations.

Context

This is what we currently use in library rest apis: https://github.com/openedx/edx-platform/blob/d91676fcb43c9d40720fd6a5a5f617b73c4e63bb/openedx/core/djangoapps/content_libraries/api/libraries.py#L310

Currently, this is the only way I know I can use the openedx-authz enforcement in the edx-platform code: openedx/openedx-platform#37501 (but right now we are relying on old code permission-denied managment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions