Coverage for gws-app/gws/plugin/account/core.py: 0%

32 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-05 13:35 +0200

1"""Constants for user accounts.""" 

2 

3import gws 

4 

5 

6class Category: 

7 """Categories of temporary codes, also used as template subject prefixes for emails.""" 

8 

9 onboarding = 'onboarding' 

10 """Code for the onboarding procedure.""" 

11 resetPassword = 'resetPassword' 

12 """Code for a password reset, not used yet.""" 

13 

14 

15class Status(gws.Enum): 

16 """Account status.""" 

17 

18 new = 0 

19 """Created or reset, onboarding not started.""" 

20 onboarding = 1 

21 """Onboarding in progress.""" 

22 active = 10 

23 """Active, the user can log in.""" 

24 

25 

26class Columns: 

27 """Column names in the accounts table.""" 

28 

29 username = 'username' 

30 """Login name, not used: the login column is configured with ``usernameColumn``.""" 

31 email = 'email' 

32 """Email address.""" 

33 status = 'status' 

34 """Account status, see ``Status``.""" 

35 password = 'password' 

36 """Password hash.""" 

37 mfaUid = 'mfauid' 

38 """Uid of the selected MFA adapter, empty for no MFA.""" 

39 mfaSecret = 'mfasecret' 

40 """MFA secret.""" 

41 tc = 'tc' 

42 """Temporary code.""" 

43 tcTime = 'tctime' 

44 """Creation time of the temporary code, as a Unix timestamp.""" 

45 tcCategory = 'tccategory' 

46 """Category of the temporary code, see ``Category``."""