snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Wrong permission in ManufacturersController:edit() and update()

Open iljalukin opened this issue 6 years ago • 3 comments

Please confirm you have done the following before posting your bug report:

Describe the bug Granting edit permission to manufacturers does not apply

To Reproduce Steps to reproduce the behavior:

  1. Go to People, choose an existing person without global super user rights
  2. Click on edit, choose Permissions and grant Manufacturers->Edit permission
  3. Go to Settings->Manufacturers and edit one
  4. See error 403

Expected behavior A person with granted edit permission to manufacturers should be able to edit them.

Screenshots If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • Snipe-IT Version: 4.8.0
  • OS: Debian 10
  • Web Server: nginx
  • PHP Version: 7.2

Desktop (please complete the following information):

  • OS: Linux Mint
  • Browser Firefix
  • Version 72

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Error Messages

  • WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproducible on the demo: https://snipeitapp.com/demo.
  • Include any additional information you can find in storage/logs and your webserver's logs.

Additional context The update/edit methods in app/Http/Controllers/ManufacturersController.php contain $this->authorize('edit', Manufacturer::class); If I change the permission to update instead of edit ($this->authorize('update', Manufacturer::class);), there is no 403 error and everything works as expected.

iljalukin avatar Feb 12 '20 10:02 iljalukin

Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!

stale[bot] avatar Apr 12 '20 11:04 stale[bot]

This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.

stale[bot] avatar Apr 19 '20 12:04 stale[bot]

is this fixed now a new release? I have the same issue .. Verison 4.8.0

heikoboehme avatar Jun 19 '20 13:06 heikoboehme