Skip to content
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

Creation of next available IP address via REST API requires extraneous permission #4743

Closed
jeremystretch opened this issue Jun 10, 2020 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

Environment

  • Python version: 3.6.9
  • NetBox version: 2.8.5

Steps to Reproduce

  1. Create a user with permission to create IP addresses but not prefixes
  2. Assign the user a REST API token with write ability
  3. Create a new prefix and note its numeric ID
  4. Make the following API call in an attempt to create an available IP address within the prefix:
curl -X POST \
-H "Authorization: Token  $TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json; indent=4" \
http://localhost:8000/api/ipam/prefixes/$PREFIX_ID/available-ips/

Expected Behavior

A 201 response should be received indicating the creation of a new IP address.

Observed Behavior

Received a 403 error indicating lack of permission to perform this operation. After assigning the user permission to create a prefix, the request succeeds as expected.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Jun 10, 2020
@jeremystretch jeremystretch self-assigned this Jun 10, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2020
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

1 participant