1
0
mirror of https://github.com/kakwa/ldapcherry synced 2024-11-22 09:24:21 +01:00

fix doc string in ppolicy

This commit is contained in:
kakwa 2015-07-17 08:28:39 +02:00
parent cdae704afd
commit 2508739838

View File

@ -11,16 +11,18 @@ from ldapcherry.exceptions import MissingParameter
class PPolicy:
def __init__(self, config, logger):
""" password policy constructor
@dict config: the configuration of the ppolicy
@logger logger: a python logger
""" Password policy constructor
:dict config: the configuration of the ppolicy
:logger logger: a python logger
"""
pass
def check(self, password):
""" check that a password match the ppolicy
@str password: the password to check
@rtype: dict with keys 'match' a boolean
""" Check if a password match the ppolicy
:str password: the password to check
:rtype: dict with keys 'match' a boolean
(True if ppolicy matches, False otherwise)
and 'reason', an explaination string
"""
@ -28,15 +30,17 @@ class PPolicy:
return ret
def info(self):
""" gives information about the ppolicy
@rtype: a string describing the ppolicy
""" Gives information about the ppolicy
:rtype: a string describing the ppolicy
"""
ret = "There is no password policy configured"
def get_param(self, param, default=None):
"""
@str param: name of the paramter to recover
default: the default value, raises an exception
""" Get a parameter in config (handle default value)
:str param: name of the paramter to recover
:str default: the default value, raises an exception
if param is not in configuration and default
is None (which is the default value).
"""