Preserve role for existing users when using ReverseProxy authentication

This commit is contained in:
Frederic Guillot
2016-07-02 17:44:45 -04:00
parent 10d577ad9d
commit 43337d58c0
4 changed files with 133 additions and 3 deletions

View File

@@ -45,7 +45,8 @@ class ReverseProxyAuth extends Base implements PreAuthenticationProviderInterfac
$username = $this->request->getRemoteUser();
if (! empty($username)) {
$this->userInfo = new ReverseProxyUserProvider($username);
$userProfile = $this->userModel->getByUsername($username);
$this->userInfo = new ReverseProxyUserProvider($username, $userProfile ?: array());
return true;
}