gnue-appserver patch for authorizations
David Ayers <[email protected]> Fri, 02 May 2008 22:14:15 +0200
| Newsgroups | gmane.comp.gnu.enterprise.general |
|---|---|
| Message-ID | <[email protected]> |
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. _______________________________________________ Gnue mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnue
patch
(text/plain, 620 B)
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 ()