Currently when an admin saves a user with autologout enabled configuration is written for each user's individual logout threshold.
This not only reduces the module's footprint, but allows for workflows where configuration changes should not be made on the production environment; only on staging or local environments.
Certain hosting providers (e.g. Pantheon) don't allow config to be written unless the site is flipped from (default) git mode into sftp mode, which means with autologout enabled users wouldn't be able to be saved.
All this said, I'm attaching a patch that exposes a admin setting to "Disable user-specific logout thresholds" that, if TRUE, hides the autologout threshold text field from the user edit form and does not set a autologout.user.uid configuration item on form submit.
Comments
Comment #2
caxy4 commentedUploading patch promised in description.
Comment #4
naveenvalechaThis needs reroll after #2761337: Remove @file tag docblock from all the .php files.
Comment #5
arijits.drushAdding settings on admin panel to enable or disable
Comment #6
naveenvalechaAfter posting patch, set it to N/R so that it would be testable on drupal ci
Comment #8
arijits.drushComment #9
arijits.drushComment #10
AsadKamil commentedHi All,
It seems there are 2 errors while applying the patch.Please check
Comment #11
arijits.drushComment #12
arijits.drushFixed white space warning as define by "Asad"
Comment #13
ajitsThere are too many unnecessary file permission changes coming in from the patch. These needs to be fixed before asking for a review.
Comment #14
arijits.drushComment #15
arijits.drushComment #16
arijits.drushComment #17
arijits.drushComment #18
lomasr commentedI applied the patch in #14 . Patch did not applied cleanly. Please see the screen.
Comment #19
ajitsComment #20
arijits.drushUsed to work correct , Think new line added .
Here is the revised patch
Comment #21
arijits.drushComment #22
ruscoe commentedRerolled patch against 8.x-1.x.
Comment #23
ruscoe commentedPatch in #22 contained a minor error.
Comment #24
bzoks commentedRerolled patch #23 against the current version of 8.x-1.x.
Added missing schema change, default value and update hook.
Added clearing of already configured individual timeouts when they become disabled by admin setting.
Comment #25
bcizej commentedTested, works good, thanks.
Comment #26
boshtian commentedI think the solution we have is still not good and needs additional work.
User specific settings are stored in user.data which is good.
The only thing missing is, that now by default each user can change the logout threshold and we don't have a setting to remove that. What we need to do is add additional setting for autologout, check if user can change the value in form_alter where we're adding this field and this is it.
Comment #27
bcizej commented@boshtian And that is exactly what @bzoks patch does.
Here is a rerolled patch.
Comment #28
bcizej commentedComment #29
boshtian commentedOK, all clear. I got confused by the issue description.
Thanks for reroll, tested it, looks good.
Comment #31
boshtian commented