[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUe] gnue-appserver patch for authorizations
From: |
David Ayers |
Subject: |
[GNUe] gnue-appserver patch for authorizations |
Date: |
Fri, 02 May 2008 22:14:15 +0200 |
User-agent: |
Mozilla-Thunderbird 2.0.0.12 (X11/20080420) |
Hello,
When I started using authorization with an empty accesslist I got an
exception due to .split() being sent to None. So here is a patch which
will avoid the exception so the real error will be displayed.
Cheers,
David
PS: the sample/auth.gcd file defines the access list as a string(100).
Thats pretty small even for small applications especially since the
gnue_* classes need to be included.
I've changed my version to 5000 but I'm not sure whether other backends
will be able to handle it. I think it at least deserves a comment...
I'm brainstorming about a true detail class which can reference
arbitrary modules (or even groups if modules with configurable access
options like read/write)... but that's for another day.
Index: gnue-appserver/src/geasAuthentication.py
===================================================================
--- gnue-appserver/src/geasAuthentication.py (Revision 9872)
+++ gnue-appserver/src/geasAuthentication.py (Arbeitskopie)
@@ -114,7 +114,11 @@
assert gDebug (1, "User '%s' logged in." % user)
- session.tablelist = rec.getField (u'gnue_accesslist').split (',')
+ list = rec.getField (u'gnue_accesslist')
+ if list:
+ session.tablelist = list.split (',')
+ else:
+ session.tablelist = []
finally:
resultSet.close ()
- [GNUe] gnue-appserver patch for authorizations,
David Ayers <=