[RBAC] Add field to permission model to capture the service identifier #222
Labels
api
API related item
app:rbac
code quality
This item relates to code quality
enhancement
New feature or request
Part of the reason for introducing the
DABPermission
model was to do this work. This proposes to add a new field to that model which has a similar format asResourceType.name
. As the resource type name field is of format"{service}.{model}"
, this new field would be of format"{service}.{action}_{model}"
.This would be an informative field for use by API clients. It will be logically commutable from the other fields and the resource registry. This has to be saved in the migration logic.
Tentatively, say this field is named
full_name
. Becausename
is taken.The serializer for
/api/v1/role_definitions/
will then use aSlugRelatedField
withmany=True
andslug_field="full_name"
. This means thatPermissionField
will be deleted.That will take
"choices"
away from the OPTIONS data, which implies/obligates us to add a new endpoint to provide options for permissions. The API design constraints related to that are complex, and is one thing that has prevented me from getting this done before now.The text was updated successfully, but these errors were encountered: