From a462d419bdbee8f792561593e7a7ea6200e5e800 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 8 Mar 2007 22:22:21 +0000 Subject: [PATCH] - raise PLCPermissionDenied when a session auth'd api call fails due to role restrictions. Now users no longer lose their web session if they make a call without the appropriate role. --- PLC/Auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PLC/Auth.py b/PLC/Auth.py index ecebb8a..627eece 100644 --- a/PLC/Auth.py +++ b/PLC/Auth.py @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: Auth.py,v 1.16 2007/02/05 19:20:38 tmack Exp $ +# $Id: Auth.py,v 1.17 2007/02/10 18:39:09 mlhuang Exp $ # import crypt @@ -147,7 +147,7 @@ class SessionAuth(Auth): person = persons[0] if not set(person['roles']).intersection(method.roles): - raise PLCAuthenticationFailure, "Not allowed to call method" + raise PLCPermissionDenied, "Not allowed to call method" method.caller = persons[0] -- 2.43.0