I am trying to add a new UserSource for LoginManager. I placed a directory
SampleUserSource in /usr/lib/zope/lib/python/Products , in this directory I
placed two files __init__.py and SampleUserSource.py . Here are the
contents of the files:


from SampleUserSource import SampleUserSource

def initialize(context):
  ''' Register SampleUserSource class as a ZPatterns Plug-in'''
    permission = 'Add Sample User Source',
    constructors = defaultConstructors(SampleUserSource, globals()))



from Products.LoginManager.UserSources import BasicUserSource

class SampleUserSource(BasicUserSource):
  """ Sample UserSource plugin """

  meta_type = "Sample User Source"

  def retrieveItem(self, name):
    raise NotImplementedError

  def rolesForUser(self, user):
    raise NotImplementedError

  def domainsForUser(self, user):
    raise NotImplementedError

  def authenticateUser(self, user, password, request):
    raise NotImplementedError

I restart Zope, but the new user source does not show up in the products
list, nor does it show up in the list of available user sources. Obviously,
I am missing something here either about making Python Products or
plug-ins. If anyone could point out to me what I am doing wrong I would
appreciate it. There are .pyc files in the SampleUserSource directory so I
know Zope at least is aware of the files existence.

Harry Henry Gebel, ICQ# 76308382
West Dover Hundred, Delaware

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

Reply via email to