Replies: 1 comment
-
@ridoo I think this can be closed since your PR has been merged. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it somehow possible to add custom permissions to GeoNode?
Working on a UI feature which shall be available only for users having a particular permission, e.g.
can_trigger_some_action
. Django and geonode-mapstore-client provides some tooling as such:myapp.models.py
Here, the model just provides the permissions -- no table creation needed. Now, I can create a group, add that permission via admin, and assign the group to a user. In my Django app this works:
myapp.views.py
However, I'd expected the API to return the new permission, so I can put the following snippet in my UI config:
localConfig.json
This does not work unfortunately, as it seems that only well known permissions are collected:
geonode/geonode/people/models.py
Lines 208 to 209 in 33be915
Sending a request to
/api/v2/users/1001
would skip theperms
field completely as (obviously) no mapping exists fromgeonode.security.permissions.PERMISSIONS
. For this, I created this bug report: #12639What I would like is to make custom permissions available via API.
@mattiagiupponi @giohappy Do I miss something here? Why is that mapping necessary?
Beta Was this translation helpful? Give feedback.
All reactions