Describe the bug
The only permission a user needs to restart a resource is the ability to patch the resource. It follows that a user with e.g. the permission to patch a deployment should also see the option to restart the deployment in headlamp. This is however not the case.
The reason is that Headlamp checks if the user has the "update" permission instead.
Inversely that also means that a user with only the ability to update deployments sees a Restart Button, but gets an error when trying to user it. (After all they are not authorised to do so).
To Reproduce
Steps to reproduce the bug:
- Create a user with only the ability to patch, not update, deployments.
- Confirm the ability to restart deployments by running "kubectl rollout restart deployment "
- Switch to the deployment view in headlamp and click on the three dots
- There is no restart button.
Environment (please provide info about your environment):
- Installation type: Windows (Though I suspect this does not matter)
- Headlamp Version: 0.41.0
- Other: None
Are you able to fix this issue?
If this is confirmed to be a bug that should be fixed, I'm happy to make a pull request replacing the update with patch. But I'll probably not have the time to test this thoroughly or anything.
Additional Context
Describe the bug
The only permission a user needs to restart a resource is the ability to patch the resource. It follows that a user with e.g. the permission to patch a deployment should also see the option to restart the deployment in headlamp. This is however not the case.
The reason is that Headlamp checks if the user has the "update" permission instead.
Inversely that also means that a user with only the ability to update deployments sees a Restart Button, but gets an error when trying to user it. (After all they are not authorised to do so).
To Reproduce
Steps to reproduce the bug:
Environment (please provide info about your environment):
Are you able to fix this issue?
If this is confirmed to be a bug that should be fixed, I'm happy to make a pull request replacing the update with patch. But I'll probably not have the time to test this thoroughly or anything.
Additional Context