mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-25 18:54:29 +01:00
fix doc string in ppolicy
This commit is contained in:
parent
cdae704afd
commit
2508739838
@ -11,16 +11,18 @@ from ldapcherry.exceptions import MissingParameter
|
|||||||
class PPolicy:
|
class PPolicy:
|
||||||
|
|
||||||
def __init__(self, config, logger):
|
def __init__(self, config, logger):
|
||||||
""" password policy constructor
|
""" Password policy constructor
|
||||||
@dict config: the configuration of the ppolicy
|
|
||||||
@logger logger: a python logger
|
:dict config: the configuration of the ppolicy
|
||||||
|
:logger logger: a python logger
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def check(self, password):
|
def check(self, password):
|
||||||
""" check that a password match the ppolicy
|
""" Check if a password match the ppolicy
|
||||||
@str password: the password to check
|
|
||||||
@rtype: dict with keys 'match' a boolean
|
:str password: the password to check
|
||||||
|
:rtype: dict with keys 'match' a boolean
|
||||||
(True if ppolicy matches, False otherwise)
|
(True if ppolicy matches, False otherwise)
|
||||||
and 'reason', an explaination string
|
and 'reason', an explaination string
|
||||||
"""
|
"""
|
||||||
@ -28,15 +30,17 @@ class PPolicy:
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def info(self):
|
def info(self):
|
||||||
""" gives information about the ppolicy
|
""" Gives information about the ppolicy
|
||||||
@rtype: a string describing the ppolicy
|
|
||||||
|
:rtype: a string describing the ppolicy
|
||||||
"""
|
"""
|
||||||
ret = "There is no password policy configured"
|
ret = "There is no password policy configured"
|
||||||
|
|
||||||
def get_param(self, param, default=None):
|
def get_param(self, param, default=None):
|
||||||
"""
|
""" Get a parameter in config (handle default value)
|
||||||
@str param: name of the paramter to recover
|
|
||||||
default: the default value, raises an exception
|
:str param: name of the paramter to recover
|
||||||
|
:str default: the default value, raises an exception
|
||||||
if param is not in configuration and default
|
if param is not in configuration and default
|
||||||
is None (which is the default value).
|
is None (which is the default value).
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user