Implementing Activate User
This commit is contained in:
parent
860c7d8067
commit
f00f59ce0b
2 changed files with 9 additions and 4 deletions
2
admin.go
2
admin.go
|
@ -56,7 +56,7 @@ func handleAdminActivateUsers(w http.ResponseWriter, r *http.Request) {
|
||||||
config.InvitationBaseDN,
|
config.InvitationBaseDN,
|
||||||
ldap.ScopeSingleLevel, ldap.NeverDerefAliases, 0, 0, false,
|
ldap.ScopeSingleLevel, ldap.NeverDerefAliases, 0, 0, false,
|
||||||
fmt.Sprintf("(&(objectClass=organizationalPerson))"),
|
fmt.Sprintf("(&(objectClass=organizationalPerson))"),
|
||||||
[]string{config.UserNameAttr, "dn", "displayName", "givenName", "sn", "mail", "uid", "cn"},
|
[]string{config.UserNameAttr, "displayName", "givenName", "sn", "mail", "uid", "cn"},
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
sr, err := login.conn.Search(searchRequest)
|
sr, err := login.conn.Search(searchRequest)
|
||||||
|
|
|
@ -3,20 +3,25 @@
|
||||||
{{define "body"}}
|
{{define "body"}}
|
||||||
<table class="table mt-4">
|
<table class="table mt-4">
|
||||||
<thead>
|
<thead>
|
||||||
<th scope="col">Identifiant</th>
|
<th scope="col">Login</th>
|
||||||
<th scope="col">Nom complet</th>
|
<th scope="col">Email</th>
|
||||||
|
<th scope="col">Nom d'ffichage</th>
|
||||||
|
<th scope="col">Prénom</th>
|
||||||
|
<th scope="col">Nom de famille</th>
|
||||||
|
<th scope="col">description</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{with $root := .}}
|
{{with $root := .}}
|
||||||
{{range $user := $root.Users}}
|
{{range $user := $root.Users}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a href="/admin/activate/{{$user.CN}}">
|
<a href="/admin/activate/{{ $user.GetAttributeValue "cn" }}">
|
||||||
{{$user.GetAttributeValue "cn"}}
|
{{$user.GetAttributeValue "cn"}}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>{{$user.GetAttributeValue "mail"}}</td>
|
<td>{{$user.GetAttributeValue "mail"}}</td>
|
||||||
<td>{{$user.GetAttributeValue "displayName"}}</td>
|
<td>{{$user.GetAttributeValue "displayName"}}</td>
|
||||||
|
<td>{{$user.GetAttributeValue "givenName"}}</td>
|
||||||
<td>{{$user.GetAttributeValue "sn"}}</td>
|
<td>{{$user.GetAttributeValue "sn"}}</td>
|
||||||
<td>{{$user.GetAttributeValue "description"}}</td>
|
<td>{{$user.GetAttributeValue "description"}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Add table
Reference in a new issue