Skip to content
Merged

Dev #535

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion INSTALL.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ ajouter cette ligne dans le crontab

## Mise à jour

Pour mettre à jour Deming, il faut aller dans le répoertoire de Deming et récupérer les sources
Pour mettre à jour Deming, il faut aller dans le répertoire de Deming et récupérer les sources

cd /var/www/deming
git pull
Expand Down
4 changes: 4 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ LDAP_TIMEOUT=5 # (optional)
LDAP_LOGIN_ATTRIBUTES=uid,cn,mail,sAMAccountName,userPrincipalName
```

# User must be member of this LDAP group
LDAP_GROUP=Mercator

**Examples**

* OpenLDAP (typical user DN: `uid=jdupont,ou=people,dc=example,dc=org`):
Expand All @@ -331,6 +334,7 @@ LDAP_LOGIN_ATTRIBUTES=uid,cn,mail,sAMAccountName,userPrincipalName
LDAP_TLS=true
LDAP_SSL=false
LDAP_LOGIN_ATTRIBUTES=uid,cn,mail
LDAP_GROUP=Merator
```

* Active Directory (UPN: `jdupont@example.org`, sAM: `jdupont`):
Expand Down
16 changes: 1 addition & 15 deletions app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,15 @@ class LoginController extends Controller
use AuthenticatesUsers;

protected string $redirectTo = '/home';
protected string $username;

public function __construct()
{
$this->middleware('guest')->except('logout');
$this->username = $this->findUsername();
}

/**
* N'utiliser QUE le champ 'login' comme identifiant.
*/
public function findUsername(): string
{
$login = trim((string) request()->input('login', ''));
// On merge pour que credentials($request) prenne bien 'login'
request()->merge(['login' => $login]);

return 'login';
}

public function username(): string
{
return $this->username;
return 'login';
}

/**
Expand Down