Wrong permission in ManufacturersController:edit() and update()
Please confirm you have done the following before posting your bug report:
- [x] I have enabled debug mode
- [x] I have read checked the Common Issues page
Describe the bug Granting edit permission to manufacturers does not apply
To Reproduce Steps to reproduce the behavior:
- Go to People, choose an existing person without global super user rights
- Click on edit, choose Permissions and grant Manufacturers->Edit permission
- Go to Settings->Manufacturers and edit one
- 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/logsand 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.
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!
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.
is this fixed now a new release? I have the same issue .. Verison 4.8.0