[Zope-dev] Better user management: Usership vs. Membership

2000-10-11 Thread Jonas Juselius

Hello,

I had a look at the Membership product, but I could not get it to work. It
seems that the PortalMember ZClass in the PortalMembership Product inherits
from _ZClass_for_LoginUser, which is no longer in the LoginManager... But
actually I don't care... I tried to contact Bill about the Membership Prod,
but he seems to be unreachable because his mail address doesn't work. 

I found many nice ideas in the Membership product, and I think it would really
be a good idea to develop it further. Does anybody know about any recent
developments or what the current status is? Is there going to be a new
release soon, is anyone even working on the Membership product?

I also looked in dev.zope.org, and found proposals about a new user management
system for Zope. Does anybody know anything about this? 

What I would like, is to take the Membership product and turn
it into a flexible 'Usership' product. This would mean simplifying the 
Membership by  removing all the joining stuff and the like, and instead 
concentrate on building a nice user management environment for user admins
(which need not necessarily be 'Manager'). Here is a list of things that I
would like to see:

* users would be able to log in via a nice login screen
* users have user info attached to them, which they may or may not change
* users can change their passwords 
* adding users is not automatic (the user manager adds and removes users)
* possibility to automatically create properly protected home dirs for users
* perhaps logging of user activity 

My main point is that I think most sites are not interested in Membership in a
Portal or half-Portal sense, but would like to be able to set up a nice env
for their content managers/designers and other users who just log in to access
restricted info like on an intranet...

One of my main concerns is that I'm wasting my time... Many of the underlying
products for a better user management system are still evolving rapidly, and
anything built on top of these, is likely to break many times. Also,
since there has already been discussions about a new user system, someone
might already be working on it, and have better ideas. I would also be
interested in hearing what DC has to say, and what their plans are...

Best regards, 
  jonas

-- 
And what is good, Phaedrus,
And what is not---
Need we ask anyone to tell us these things?

[ PGP public key: http://www.iki.fi/jonas/pubkey.asc ]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] LoginManager ownership bug!

2000-10-06 Thread Jonas Juselius

Thanks!

I actually tried to make _owner a class attrib, but then I tried to add a LM
to a sub-folder ;-) It didn't work out... Would it be an ugly solution to
check whether the LM _is_ top-level, and if it is, make _owner a class attrib?
Would it work? Or is this solution only curing the symptoms, while the
patient is dying of cancer?

I also realized that LM:s support local roles, and I had it pointed out to me
that the reason for the default behaviour, is the scaling of Zope... I now have
a different scheme in mind...

Take care,
 .jonas.

On Fri, Oct 06, 2000 at 04:01:01PM +, Ty Sarna wrote:
> In article <[EMAIL PROTECTED]>,
> Jonas Juselius  <[EMAIL PROTECTED]> wrote:
> > The problem has to do with the ownership of the acl_users. When the
> > LoginManager (acl_users) is created it sets the _owner attribute to
> > UnownableOwner. This is fine, for if the acl_users folder is owned it results
> ...
> > The problem is that the acl_users folder becomes _owned_ (by whom I don't
> > know) every time Zope is restarted, or when any method is edited or added in
> 
> I think this is due to Shane's fix for allowing LM's as non-top-level
> acl_users. I had it originally so that _owner was a class attribute,
> which works fine. With the change, it was added as an instance
> attribute. Now, UnownableOwner is just an empty list, []. Zope checks
> for UnownableOwner using an identity check, that is in python: "_owner is
> UnownableOwner". When the LM is pickled to ZODB and reloaded, _owner is
> still an empty list, but it's not *the* empty list. That is, in python
> terms: it's still *equal* to UO, but it isn't "is" UO.
> 
> We could go back to just having it as a class attribute, but then that
> breaks when adding a LM anywhere other than the top folder, because Zope
> wants to delete the _owner from it.
> 
> > Another thing which I have tried to do, is to add  support for local roles to 
> > the LoginManager. At first it looked rather simple, but then I realized that
> > it wasn't really _that_ simple, and dropped it because I don't have time... It
> > would however be nice to have local roles support in the LoginManager, as it
> > would make it more complete.
> 
> LM supports local roles fine. Unfortunately, the Zope's treatment of
> them doesn't scale (a listview just doesn't work for 1500 users, and
> other parts of the machinery want to do things like "Get me a list of
> all local roles for all users" just so that it can see if *one* user has a
> specific role or set of roles.) We've submitted patches for some things,
> but not gotten much interest from DC.
> 
> ___
> Zope-Dev maillist  -  [EMAIL PROTECTED]
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )

-- 
And what is good, Phaedrus,
And what is not---
Need we ask anyone to tell us these things?

[ PGP public key: http://www.iki.fi/jonas/pubkey.asc ]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] Removing uninstalled Prods from ZODB?

2000-10-06 Thread Jonas Juselius

Hola,

I would like to know how to remove removed Products from the ZODB. This might
sound silly, but I tried out POPMail and the PTK-0.8, then I uninstalled them 
and removed all the files. After I restarted Zope everything looked fine, no 
trace of the Products in the Control Panel Products list. However, I still
have 'Advanced' tabs from the PTK in some management screens, and the POPMail
has left some base classes for ZClasses. As a result of the POPMail garbage,
I'm not able to add any new ZClasses to the system because:

Error Type: Could not load oid 
Error Value: None

In the debug output I find that something related to POPMail is screwing up
my system... Can anybody tell me how to get rid of all this half uninstalled
Products (other than exporting all my objects and re-importing them into a
clean ZODB)? 

Perhaps an uninstall API for Products would be a good idea... something like

def unititalize(context):
context.unregisterClass() 

in __init__.py, that gets called when a Product is removed from the Product
Management screens...

cheers, 
 .jonas.

-- 
And what is good, Phaedrus,
And what is not---
Need we ask anyone to tell us these things?

[ PGP public key: http://www.iki.fi/jonas/pubkey.asc ]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] LoginManager ownership bug!

2000-10-06 Thread Jonas Juselius

Cheers!

I actually tried to implement support for local roles in almost exactly the 
same way as you did, but for some reason I didn't get it to work. 
Perhaps I should look into the matter again... I just threw in the 
user_names(), and getUserNames() into the LoginManager, added some dtml to
handle SQL and... it didn't work, so I dropped it... ;-) I'll try to come up
with some nice way to handle local roles in a proper way in the LoginManager,
and hope that I get my patches accepted :-)

Do you have any clue about the ownership bug in the LoginManager? I find it
quite strange that an unowned object becomes owned whenever Zope is restarted
(or when a method is added...). I suspect that the problem is within the
ZPatterns modules, since it handles the persistance of the LoginManager...
This is how the LoginManager is inited and ownership is set:

ob=LoginManager()
ob._owner=UnownableOwner
self._setObject('acl_users', ob)

I tried to make _owner a global attribute of the LoginManager, but that didn't
solve the problem. I have also written Ty Sarna, but I have not received any
response yet.

One more thing... I'm new to PythonMethods, and I would like to know how to
get access to the self attirbute (or the DTML namespace if you like) from
PythonMethods. I would like to use PythonMethods more, beacuse dtml quickly
becomes unreadable and ugly, and Python is always beautiful :-) 

Have a nice day,
 .jonas.

On Thu, Oct 05, 2000 at 08:11:45AM -0700, Michael Bernstein wrote:
> Jonas Juselius wrote:
> >
> > Another thing which I have tried to do, is to add  support for local roles to
> > the LoginManager. At first it looked rather simple, but then I realized that
> > it wasn't really _that_ simple, and dropped it because I don't have time... It
> > would however be nice to have local roles support in the LoginManager, as it
> > would make it more complete.
> > 
> > I am currently using Zope-2.2.1 (and Zope-2.2.2), ZPatterns-0-4-2a1 and
> > LoginManager-0_8_7a1.
> 
> I used Membership 0.7.6 on top of what you've got, and added
> support for local roles as detailed in this posting:
> 
> http://lists.zope.org/pipermail/zope-dev/2000-September/007030.html
> 
> This ought to give you the clues you need to add the
> neccessary getUserNames method to a SQL User Source, and
> make the LoginManager user_names modification as well. If
> you have any ideas on how to generalize the user_names
> method, I'd like to hear them.
> 
> Let me know how it goes,
> 
> Michael Bernstein.

-- 
And what is good, Phaedrus,
And what is not---
Need we ask anyone to tell us these things?

[ PGP public key: http://www.iki.fi/jonas/pubkey.asc ]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




[Zope-dev] LoginManager ownership bug!

2000-10-05 Thread Jonas Juselius

Hola,

There seems to be a problem with the ownership model in Zope (or ZPatterns). 

The problem is the following: I have implemented a nice login system based on
the LoginManager and SQL methods. I would like to make this acl_users the
top level user folder, but... then hell brakes lose... 

The problem has to do with the ownership of the acl_users. When the
LoginManager (acl_users) is created it sets the _owner attribute to
UnownableOwner. This is fine, for if the acl_users folder is owned it results
in various errors: Excessive recursion or ValueError: unpack list of wrong
size (when logging in), IndexError: list index out of range (when trying to
view ownership info of acl_users). This has to do with the top-level folder
being unowned, it seems. There is no problem with the LoginManager being owned
in a folder which is owned itself.

The problem is that the acl_users folder becomes _owned_ (by whom I don't
know) every time Zope is restarted, or when any method is edited or added in
the acl_users folder. It seems that the _owned attribute is not persistent, or
that something, somewhere changes it. I have a dirty fix for the moment,
consisting of an external method which sets the ownership of acl_users to
UnownableOwner. This is however a far from satisfying solution...

Another thing which I have tried to do, is to add  support for local roles to 
the LoginManager. At first it looked rather simple, but then I realized that
it wasn't really _that_ simple, and dropped it because I don't have time... It
would however be nice to have local roles support in the LoginManager, as it
would make it more complete.

I am currently using Zope-2.2.1 (and Zope-2.2.2), ZPatterns-0-4-2a1 and 
LoginManager-0_8_7a1.

Best regards, 
  .jonas.


--
*******
 Jonas Juselius   e-mail...: [EMAIL PROTECTED]
  voice: +358 9 191 40188 
 P.O. Box 55/ Department of Chemistry GSM..: 040 506 6599 
 FIN-00014 University of Helsinki fax..: +358 9 191 40169 
 FINLAND  http://www.iki.fi/jonas   

 Home address:
  Helsinginkatu 16 B 42   tel..: +358 9 753 3369
  00500 Helsinki
  FINLAND
***
[ GPG public key: http://www.iki.fi/jonas/pubkey.asc ]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )