Add a field to see all global permissions on all models that define a permission method.
The field will return a dictionary with a key for EACH model defining at least one global permission, each of these key representing a model will contain a dictionary of the format {"permission_name": permission value}
Example
Example of usage:
from dry_rest_permissions.generics import DRYGlobalPermissionsField
class ProjectSerializer(serializers.ModelSerializer):
permissions = DRYGlobalPermissionsField()
class Meta:
model = Project
fields = ('id', 'owner', 'permissions')
Description
Add a field to see all global permissions on all models that define a permission method.
The field will return a dictionary with a key for EACH model defining at least one global permission, each of these key representing a model will contain a dictionary of the format
{"permission_name": permission value}
Example
Example of usage:
Example of return:
Details of the feature
has_read_permission
has_write_permission
has_list_permission
has_create_permission
has_destroy_permission
has_retrieve_permission
has_update_permission
has_custom_action1_permission
Checklist