git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b08899
)
- fix case when caller has no keys
author
Mark Huang
<mlhuang@cs.princeton.edu>
Fri, 20 Oct 2006 18:15:40 +0000
(18:15 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Fri, 20 Oct 2006 18:15:40 +0000
(18:15 +0000)
PLC/Methods/GetKeys.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/GetKeys.py
b/PLC/Methods/GetKeys.py
index
de0eb13
..
82c7ffc
100644
(file)
--- a/
PLC/Methods/GetKeys.py
+++ b/
PLC/Methods/GetKeys.py
@@
-25,11
+25,10
@@
class GetKeys(Method):
def call(self, auth, key_ids = None):
# If we are not admin, make sure to only return our own keys
if 'admin' not in self.caller['roles']:
+ key_ids = set(key_ids).intersection(self.caller['key_ids'])
if not key_ids:
- key_ids = self.caller['key_ids']
- else:
- key_ids = set(self.caller['key_ids']).intersection(key_ids)
-
+ return []
+
keys = Keys(self.api, key_ids).values()
# Turn each key into a real dict