UserKit | index /usr/local/share/webware/UserKit/__init__.py

`# UserKit
# Webware for Python`

Package Contents

``

HierRole Properties Role RoleUser | RoleUserManager RoleUserManagerMixIn RoleUserManagerToFile RoleUserManagerToMiddleKit | Tests (package) User UserManager UserManagerToFile | UserManagerToMiddleKit

Functions

``

InstallInWebKit(appServer)

dont_use_combineManagerClasses(*classesOrNamesThereof)
  `----
  While this was a nice idea that nearly worked, it broke on keyword arguments to __init__ methods. Fixing it seemed nastier than the next solution: Split RoleUserManager's methods out into RoleUserManagerMixIn, which inherits nothing. Then use the mix-in for the various manager classes, taking care of problems manually in the classes.
  @@ 2002-04-10 ce
  ----
  Given a list of "orthogonal" classes (or their names), that all inherit from UserManager, this function returns a new class that combines all of them. By "orthogonal" we mean that the features of the user manager are separate concerns and not dependent on each other.
  Out of the box, UserKit provides custom user managers for:
  * persistence
  * defining roles
  Example:
  from UserKit.UserManagerToFile import UserManagerToFile as UMFile
  from UserKit.RoleUserManager import RoleUserManager as UMRole
  MyUserManager = UserManagerCombo(UMFile, UMRole)
  Or using strings:
  MyUserManager = UserManagerCombo('UserManagerToFile', 'RoleUserManager')
  Note that strings only work for UserManager subclasses found in UserKit (or somewhere on the Python path). @@ 2001-04-03 ce: a future version should accepted dotted notation for pkgA.pkgB.module.
  Do not include the top level, abstract UserManager class in the list.
  If you must know, the classes are combined by stacking copies of them vertically. The original classes are not modified in any way.
  You could pass a single parameter if you wanted.
  For subclassers of UserManager: In order to qualify for use by this class you have to follow some conventions:
  - Suppose your class name is Foo
  - Your class must inherit UserKit.UserManager
  - Your class must define this attribute:
  baseOfFoo = UserManager
  - When "invoking super" you cannot do this:
  UserManager.someMethod(self, arg1, arg2)
  But instead must do this:
  self.baseOfFoo.someMethod(self, arg1, arg2)
  Yes, that's a little weird. But it's minimal and it empowers this function to create a combination class from orthogonal subclasses of UserManager. I think that if Python had a true "super" feature like Smalltalk and Objective-C, these conventions wouldn't be necessary.`