Users can create tokens for themselves, but UI does not reflect that. #6073
Labels
status: accepted
This issue has been accepted for implementation
type: bug
A confirmed report of unexpected behavior in the application
NetBox version
v2.10.4
Python version
3.6
Steps to Reproduce
Active user(no permissions needed).
Check /user/api-tokens/. Notice the missing options for creating/modifying/deleting API Tokens. (Except for Copy if you have any token already)
Send post request(Login done earlier):
URL:
https://[URL]/user/api-tokens/add/
Headers:
{'Referer': 'https://[URL]/login/'}
Data:
{'csrfmiddlewaretoken': '[Token from login]', 'write_enabled': 'on', 'description': '[description]'}
If you then check /user/api-tokens/, you now have a token.
Expected Behavior
I would expect to able to create/modify/delete API token for my own user, since these should only give the same access as my weblogin.
Observed Behavior
I can create a token(modify/delete not checked), using post request but the options are not available in the presented GUI.
If as a user(without token perms) go to this url(/user/api-tokens/add/) i receive an empty page.
The text was updated successfully, but these errors were encountered: