Short description

sometimes it is wanted to have a different period for the recovery token lifetime than 12h.

If you need to setup groups and use hierarchical acls you don't want to add users to groups which don't have an account yet. But the other way it works. You can create users which later use the wiki and add them to the right groups. If the setup is ready you can invite the people.

But because they don't have done the password recovery request theirselfs 12h may be not long enough because of different timezones.

A superuser can do the invitation from the SystemAdmin do user browser. See another patch at DifferentMessageFromSuperuserMailAccountData

   1 diff -r 63016f784d88 MoinMoin/config/multiconfig.py
   2 --- a/MoinMoin/config/multiconfig.py	Mon Apr 05 23:37:52 2010 +0200
   3 +++ b/MoinMoin/config/multiconfig.py	Wed Apr 07 11:19:40 2010 +0200
   4 @@ -790,6 +790,8 @@
   5      ('password_checker', DefaultExpression('_default_password_checker'),
   6       'checks whether a password is acceptable (default check is length >= 6, at least 4 different chars, no keyboard sequence, not username used somehow (you can switch this off by using `None`)'),
   7  
   8 +    ('recovery_token_lifetime', 12, 'time in hours a recovery token is valid.'),
   9 +
  10    )),
  11    # ==========================================================================
  12    'spam_leech_dos': ('Anti-Spam/Leech/DOS',
  13 diff -r 63016f784d88 MoinMoin/user.py
  14 --- a/MoinMoin/user.py	Mon Apr 05 23:37:52 2010 +0200
  15 +++ b/MoinMoin/user.py	Wed Apr 07 11:19:40 2010 +0200
  16 @@ -990,7 +990,7 @@
  17          except ValueError:
  18              return False
  19          # only allow it to be valid for twelve hours
  20 -        if stamp + 12*60*60 < time.time():
  21 +        if stamp + int(self._cfg.recovery_token_lifetime)*60*60 < time.time():
  22              return False
  23          # check hmac
  24          # key must be of type string

recovery_token.patch


CategoryFeatureRequest

MoinMoin: FeatureRequests/ConfigRecoveryTokenLifetime (last edited 2010-04-07 12:08:54 by ReimarBauer)