Fixed kit checkout permissions if admin is not superadmin #11058
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is kind of a shit solution to a bigger problem. Kits have always had a problem since it was first introduced, and this does NOT solve that problem - it just puts it back to the back the way it was before (which was kinda broken.)
The real issue is that there should never have been a Kits:checkout permission. Kits are just a collection of things, so if you don't have permission to check out assets, you shouldn't be able to check out assets via kit.
Kits will be completely revamped after v6 launches on Friday, but this at least restores the previous functionality. A change we made recently removed the checkout button from kits if you were not a superadmin - which kinda makes sense, since a superadmin would have the ability to check out all of the things within a kit (assets, licenses, etc). You may still hit forbidden errors if you don't have asset checkout permission as a non-super admin, but that part was always true anyway. I suspect the majority of use cases here use assets as the primary thing that's being checked out.