src/pyams_security/vocabulary.py
changeset 0 f04e1d0a0723
child 72 6dd8bc7bb7b5
equal deleted inserted replaced
-1:000000000000 0:f04e1d0a0723
       
     1 #
       
     2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 
       
    16 # import standard library
       
    17 
       
    18 # import interfaces
       
    19 from zope.password.interfaces import IPasswordManager
       
    20 
       
    21 # import packages
       
    22 from zope.componentvocabulary.vocabulary import UtilityVocabulary
       
    23 from zope.schema.vocabulary import getVocabularyRegistry
       
    24 
       
    25 
       
    26 class PasswordManagerVocabulary(UtilityVocabulary):
       
    27     """Password managers vocabulary"""
       
    28 
       
    29     interface = IPasswordManager
       
    30     nameOnly = True
       
    31 
       
    32 getVocabularyRegistry().register('PyAMS password managers', PasswordManagerVocabulary)