Skip to content

Users can create tokens for themselves, but UI does not reflect that. #6073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
NiclasSP opened this issue Mar 31, 2021 · 0 comments
Closed
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@NiclasSP
Copy link

NetBox version

v2.10.4

Python version

3.6

Steps to Reproduce

  1. Active user(no permissions needed).

  2. Check /user/api-tokens/. Notice the missing options for creating/modifying/deleting API Tokens. (Except for Copy if you have any token already)

  3. 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]'}

  4. 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.

@NiclasSP NiclasSP added the type: bug A confirmed report of unexpected behavior in the application label Mar 31, 2021
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Mar 31, 2021
@jeremystretch jeremystretch self-assigned this Mar 31, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants