| Summary: | RFE: 'change' loan instead of just return/re-loan process | ||
|---|---|---|---|
| Product: | [Retired] Beaker | Reporter: | Derrich Hafemann <dhafeman> |
| Component: | web UI | Assignee: | Raymond Mancy <rmancy> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 0.6 | CC: | bpeck, dcallagh, ebaak, mcsontos, rmancy, stl |
| Target Milestone: | --- | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-09-02 05:07:46 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Derrich Hafemann
2011-07-20 15:39:40 UTC
I've introduced a regression with this. Owner's of systems may have trouble loaning a machine to themselves.
Here are two workarounds
1) If the system has a group (of which you are a part) set the group to have admin rights.
2) Get an Admin to loan it to you.
Because we have these workarounds, I don't think this warrants a hotfix.
Here is the suggested patch though.
diff --git a/Server/bkr/server/model.py b/Server/bkr/server/model.py
index 38cae77..f5f0117 100644
--- a/Server/bkr/server/model.py
+++ b/Server/bkr/server/model.py
@@ -1911,6 +1911,12 @@ def is_admin(self,group_id=None,user_id=None,groups=None,*args,**kw):
return True
except AttributeError,e: pass #We may not be logged in...
+ if not user_id:
+ try:
+ user_id = identity.current.user.user_id
+ except AttributeError:
+ pass
+
#If we are the owner....
if self.owner == User.by_id(user_id):
return True
This bug is marked as closed, but the regression described in comment #2 has not (as far as I can see) been resolved. Am I missing something here? No, that's correct. This is covered by 730321 |