Cache LDAP check everywhere
Tested as follows:
- sign in LDAP user;
- disable access via LDAP (in this case, disable the account in AD);
- check that the user can still access Git via SSH;
- check that the user can still browse and do API calls (issue dropdown);
- set the last_credential_check_at attribute to 2 hours ago in the console;
- SSH access fails;
- API call returns 401.
If I try to sign in again after the LDAP account was disabled, the effect is immediate.
See merge request !139