Create permissions from python code on Netbox #18210
Closed
cloud-digitaltag
started this conversation in
General
Replies: 1 comment
-
Resolved |
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
-
Hi.
I'm trying create permissions for group from spython script that I attach as configmap from helm installation.
My script is for okta authorization, but idea is that I don't want create manualy groups and permissions for this group. Instead I add some code to my okta authorization and additional stanza in helm values.
My code:
In helm values I have following additional stanza:
When I first login from okta, script creates group, assign users to this group and created permissions in database record in table users_group_permissions
But this permission not work, after login I don't see any objects in NetBox
When I created permissions from GUI it's wrote in different database tables:
users_objectpermission
users_objectpermission_object_types
users_objectpermission
I wonder is there some example how to add permissions from python. I'm using version 4.0.11
Regards
Beta Was this translation helpful? Give feedback.
All reactions