Specifying desired behaviour: 1. loan-self should *only* allow the user to loan the system to themselves if it is not currently loaned to anyone else 2. loan-any grants full power over loans for that system, includes the ability to return other people's loans and the ability to transfer an existing loan to a different user This patch should include appropriate documentation updates to describe the difference. Any related permissions errors should be reported through the UI rather than triggering an internal server error.
Bug 1015043 indicates this problem is more significant than we first thought.
*** Bug 1015043 has been marked as a duplicate of this bug. ***
Further clarification (based on bug 1015043): forcibly returning a loan should also cancel that user's current reservation (if any). There should be a confirmation prompt if a reservation would be cancelled.
Also, if the existing reservation is an automated one for a recipe, then the user attempting to forcibly return the loan will also need permission to cancel that job.
(In reply to Nick Coghlan from comment #5) > Further clarification (based on bug 1015043): forcibly returning a loan > should also cancel that user's current reservation (if any). There should be > a confirmation prompt if a reservation would be cancelled. If the confirmation prompt is necessary (in the bkr cli client), please add some -y or -f parameter to automatically force it for scripting purposes.
Proposal to fix the loan and reservation permissions ACL mapping in 0.15.1: https://lists.fedorahosted.org/pipermail/beaker-devel/2013-October/000812.html That approach should restore the same capabilities as existed in 0.14, without adding any new confirmation prompts.
On Gerrit: http://gerrit.beaker-project.org/#/c/2340/
I changed my mind on having returning a loan automatically return an existing reservation - that's more properly considered as part of the http://beaker-project.org/dev/proposals/improved-reservations-and-loans.html design proposal. For this bug, I took the simpler approach of including the ability to return other user's manual reservations as part of the "loan_any" permission.
beaker 0.15.1 has been released.