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 ##################################################### |