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 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnue

Reply via email to