entities/authobjs.py
changeset 7827 9bbf83f68bcc
parent 7797 a71618a75b53
child 7845 2172978be237
equal deleted inserted replaced
7821:3ecd114f6d75 7827:9bbf83f68bcc
    24 from cubicweb import Unauthorized
    24 from cubicweb import Unauthorized
    25 from cubicweb.entities import AnyEntity, fetch_config
    25 from cubicweb.entities import AnyEntity, fetch_config
    26 
    26 
    27 class CWGroup(AnyEntity):
    27 class CWGroup(AnyEntity):
    28     __regid__ = 'CWGroup'
    28     __regid__ = 'CWGroup'
    29     fetch_attrs, fetch_order = fetch_config(['name'])
    29     fetch_attrs, cw_fetch_order = fetch_config(['name'])
    30     fetch_unrelated_order = fetch_order
    30     cw_fetch_unrelated_order = cw_fetch_order
    31 
    31 
    32 
    32 
    33 class CWUser(AnyEntity):
    33 class CWUser(AnyEntity):
    34     __regid__ = 'CWUser'
    34     __regid__ = 'CWUser'
    35     fetch_attrs, fetch_order = fetch_config(['login', 'firstname', 'surname'])
    35     fetch_attrs, cw_fetch_order = fetch_config(['login', 'firstname', 'surname'])
    36     fetch_unrelated_order = fetch_order
    36     cw_fetch_unrelated_order = cw_fetch_order
    37 
    37 
    38     # used by repository to check if  the user can log in or not
    38     # used by repository to check if  the user can log in or not
    39     AUTHENTICABLE_STATES = ('activated',)
    39     AUTHENTICABLE_STATES = ('activated',)
    40 
    40 
    41     # low level utilities #####################################################
    41     # low level utilities #####################################################