[Zope-dev] LoginManager and Control_Panel - The Never Ending Story

Itai Tavor itai@optusnet.com.au
Tue, 30 Jan 2001 18:09:57 +1100


Hi,

I posted several questions about this problem, but got no replies. I 
thought I'd try again with a bit more information.

The problem is accessing Control_Panel from a folder that contains a 
LoginManager. I tested the same setup using a plain acl_users and 
found one difference.

Zope/
    acl_users/
       user_1 (Manager)
    Test1/
       acl_users/ (User Folder)
          user_2 (Manager)
       cnt1 (owned by user_1, Manager proxy role)
       cnt2 (owned by user_2, Manager proxy role)
    Test2/
       acl_users/ (LoginManager)
          user_3 (Manager)
       cnt1 (owned by user_1, Manager proxy role)
       cnt2 (owned by user_3, Manager proxy role)

cnt1 and cnt2 are DTML Methods containg: <dtml-var Control_Panel 
fmt=html-quote>

Logging in to /Test1/ with user_2, both /Test1/cnt1 and /Test1/cnt2 
return the Control_Panel object.

Loggin in to /Test2/ with user_3, /Test2/cnt1 return the 
Control_Panel object. /Test2/cnt2 returns KeyError: Control_Panel. 
ZDebug reports:

     Unauthorized: User itai, who is the owner of
     /OzCoasters/cnt2, is defined in the context of
     /OzCoasters, which is not an ancestor of
     /Control_Panel.

Hope anyone can understand this... it's confusing the stuffing out of 
me. But basically, the Manager proxy role allows a method to access 
Control_Panel regardless of where its owner and the logged in user 
are defined. But with LoginManager, Control_Panel is only accessible 
if the owner is defined in a regular User Folder above the 
LoginManager.

Any idea why this is happening? Any suggestions on how to test it? I 
know it's more likely to be a problem in my implementation of the 
user-supplied parts of LoginManager than a bug in LM... but my LM 
works in all other ways, and it doesn't seem to be doing anything 
wrong.

Any help would be, er, helpful (To borrow the words of King Arthur. 
Hey, a python reference! Do I get points for that?)
-- 
--
Itai Tavor                      -- "Je sautille, donc je suis."    --
itai@optusnet.com.au            --               - Kermit the Frog --
-- 'Supposing a tree fell down, Pooh, when we were underneath it?' --
-- 'Supposing it didn't,' said Pooh after careful thought.         --