-
Notifications
You must be signed in to change notification settings - Fork 1.2k
User defined permissions will break the permissions exposed by the API #12639
Copy link
Copy link
Closed
Description
Expected Behavior
Create and add custom permissions to a user (via group) does not have any effect on handling user permissions.
Actual Behavior
Adding new permissions to a user, which are not known by GeoNode, raises an exception while mapping permissions in people/models.py#perms. As a result the API skips the perms attribute completely. With the API skipping that attribute, geonode-mapstore-client sees no permissions given to a user. For example a user who has actual contributor permissions, will not have the ability to (for example) add new resources.
Steps to Reproduce the Problem
See my discussion about custom permissions to reproduce.
- Add new user (id
1001) to contributor group - Check
/api/v2/users/1001containspermsattribute - Add a custom permission to a group a user belongs to
- Check
/api/v2/users/1001is missingpermsattribute
Specifications
- GeoNode version: 4.3.1 (but would affect older versions, which I did not test)
- Installation type (vanilla, geonode-project):
- Installation method (manual, docker):
- Platform:
- Additional details: Adding custom permissions #12635
Reactions are currently unavailable