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 (from parent 1:
913c9f6
)
- raise PLCPermissionDenied when a session auth'd api call fails due to role restrict...
author
Tony Mack
<tmack@cs.princeton.edu>
Thu, 8 Mar 2007 22:22:21 +0000
(22:22 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Thu, 8 Mar 2007 22:22:21 +0000
(22:22 +0000)
PLC/Auth.py
patch
|
blob
|
history
diff --git
a/PLC/Auth.py
b/PLC/Auth.py
index
ecebb8a
..
627eece
100644
(file)
--- a/
PLC/Auth.py
+++ b/
PLC/Auth.py
@@
-4,7
+4,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: Auth.py,v 1.1
6 2007/02/05 19:20:38 tmack
Exp $
+# $Id: Auth.py,v 1.1
7 2007/02/10 18:39:09 mlhuang
Exp $
#
import crypt
#
import crypt
@@
-147,7
+147,7
@@
class SessionAuth(Auth):
person = persons[0]
if not set(person['roles']).intersection(method.roles):
person = persons[0]
if not set(person['roles']).intersection(method.roles):
- raise PLC
AuthenticationFailure
, "Not allowed to call method"
+ raise PLC
PermissionDenied
, "Not allowed to call method"
method.caller = persons[0]
method.caller = persons[0]