2020-02-09 21:06:33 +00:00
|
|
|
{{define "title"}}Explorateur LDAP |{{end}}
|
|
|
|
|
|
|
|
{{define "body"}}
|
|
|
|
|
|
|
|
<div class="d-flex">
|
2021-09-11 14:37:10 +00:00
|
|
|
<h4>LDAP-Explorer</h4>
|
|
|
|
<a class="ml-auto btn btn-info" href="/">Main Menu</a>
|
2020-02-09 21:06:33 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="mt-4">
|
|
|
|
<nav aria-label="breadcrumb">
|
|
|
|
<ol class="breadcrumb">
|
|
|
|
{{range .Path}}
|
|
|
|
{{if .Active}}
|
|
|
|
<li class="breadcrumb-item active" aria-current="page">{{.Identifier}}</li>
|
|
|
|
{{else}}
|
|
|
|
<li class="breadcrumb-item"><a href="/admin/ldap/{{.DN}}">{{.Identifier}}</a></li>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<table class="table mt-4">
|
|
|
|
<tbody>
|
|
|
|
{{range .Children}}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="/admin/ldap/{{.DN}}">
|
|
|
|
{{.Identifier}}
|
|
|
|
</a>
|
|
|
|
</td>
|
2020-02-12 14:54:17 +00:00
|
|
|
<td>{{.Name}}</td>
|
2020-02-09 21:06:33 +00:00
|
|
|
</tr>
|
|
|
|
{{end}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2020-02-09 22:13:33 +00:00
|
|
|
{{if .CanAddChild}}
|
2020-02-10 08:44:18 +00:00
|
|
|
<div class="mt-2">
|
2021-09-11 14:37:10 +00:00
|
|
|
<a class="btn btn-sm btn-success" href="/admin/create/user/{{.DN}}">+user</a>
|
|
|
|
<a class="ml-4 btn btn-sm btn-success" href="/admin/create/group/{{.DN}}">+group</a>
|
2020-02-10 14:26:02 +00:00
|
|
|
<a class="ml-4 btn btn-sm btn-success" href="/admin/create/ou/{{.DN}}">+ou</a>
|
2021-09-11 14:37:10 +00:00
|
|
|
<a class="ml-4 btn btn-sm btn-success" href="/admin/create/generic/{{.DN}}">+object</a>
|
2020-02-09 22:13:33 +00:00
|
|
|
</div>
|
|
|
|
<hr class="mt-4" />
|
|
|
|
{{end}}
|
|
|
|
|
2020-02-09 21:32:59 +00:00
|
|
|
{{if .Success}}
|
2021-09-11 14:37:10 +00:00
|
|
|
<div class="alert alert-success mt-2">Modifications have been saved.</div>
|
2020-02-09 21:32:59 +00:00
|
|
|
{{end}}
|
|
|
|
{{if .Error}}
|
|
|
|
<div class="alert alert-danger mt-2">
|
2021-09-11 14:37:10 +00:00
|
|
|
Impossible to execute the requested change.
|
2020-02-09 21:32:59 +00:00
|
|
|
<div style="font-size: 0.8em">{{.Error}}</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2021-09-11 14:37:10 +00:00
|
|
|
<h5>Attributes</h5>
|
2020-02-09 21:06:33 +00:00
|
|
|
<div class="container">
|
|
|
|
{{range $key, $value := .Props}}
|
|
|
|
{{if $value.Editable}}
|
|
|
|
<div class="row mt-4">
|
2020-02-09 21:43:24 +00:00
|
|
|
<div class="col-md-3"><strong>{{$value.Name}}</strong></div>
|
2020-02-09 21:06:33 +00:00
|
|
|
|
|
|
|
<div class="col-md-7">
|
|
|
|
<form method="POST">
|
|
|
|
<div class="form-row">
|
|
|
|
<input type="hidden" name="action" value="modify" />
|
|
|
|
<input type="hidden" name="attr" value="{{$key}}" />
|
|
|
|
<textarea name="values" rows="{{len $value.Values}}" class="form-control col-md-9">{{range $i, $x := $value.Values}}{{if $i}}{{"\n"}}{{end}}{{$x}}{{end}}</textarea>
|
|
|
|
<div class="col-md-3">
|
|
|
|
<input type="submit" value="Modifier" class="form-control btn btn-primary" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-1">
|
2020-02-10 08:54:33 +00:00
|
|
|
{{if $value.Deletable}}
|
2021-09-11 14:37:10 +00:00
|
|
|
<form method="POST" onsubmit="return confirm('Do you really want to delete this attribute ?');">
|
2020-02-10 08:54:33 +00:00
|
|
|
<input type="hidden" name="action" value="delete" />
|
|
|
|
<input type="hidden" name="attr" value="{{$key}}" />
|
|
|
|
<input type="submit" value="Suppr." class="form-control btn btn-danger btn-sm" />
|
|
|
|
</form>
|
|
|
|
{{end}}
|
2020-02-09 21:06:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{range $key, $value := .Props}}
|
|
|
|
{{if not $value.Editable}}
|
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-3"><strong>{{$key}}</strong></div>
|
|
|
|
<div class="col-md-9">
|
|
|
|
{{range $value.Values}}
|
|
|
|
<div>{{.}}</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
<form method="POST">
|
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-3">
|
|
|
|
<input type="hidden" name="action" value="add" />
|
2021-09-11 14:37:10 +00:00
|
|
|
<input class="form-control" type="text" name="attr" placeholder="Add an attribute..." />
|
2020-02-09 21:06:33 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-7">
|
|
|
|
<div class="form-row">
|
2021-09-11 14:37:10 +00:00
|
|
|
<textarea name="values" placeholder="Value(s)..." rows="2" class="form-control col-md-9"></textarea>
|
2020-02-09 21:06:33 +00:00
|
|
|
<div class="col-md-3">
|
|
|
|
<input type="submit" value="Ajouter" class="form-control btn btn-success" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2020-02-09 21:43:24 +00:00
|
|
|
{{if .HasMembers}}
|
2020-02-09 21:32:59 +00:00
|
|
|
<hr class="mt-4" />
|
2021-09-11 14:37:10 +00:00
|
|
|
<h5 class="mt-4">Members</h5>
|
2020-02-09 21:32:59 +00:00
|
|
|
<div class="container">
|
2020-02-09 21:06:33 +00:00
|
|
|
{{range .Members}}
|
2020-02-09 21:32:59 +00:00
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-3">
|
2020-02-12 14:54:17 +00:00
|
|
|
<strong>{{.Name}}</strong>
|
2020-02-09 21:32:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-5">
|
|
|
|
<a href="/admin/ldap/{{.DN}}">{{.DN}}</a>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
2021-09-11 14:37:10 +00:00
|
|
|
<form method="POST" onsubmit="return confirm('Remove from Group ?');">
|
2020-02-09 21:32:59 +00:00
|
|
|
<input type="hidden" name="action" value="delete-member" />
|
|
|
|
<input type="hidden" name="member" value="{{.DN}}" />
|
|
|
|
<input type="submit" value="Supprimer" class="form-control btn btn-danger btn-sm" />
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-09 21:06:33 +00:00
|
|
|
{{end}}
|
2020-02-09 21:32:59 +00:00
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="action" value="add" />
|
|
|
|
<input type="hidden" name="attr" value="member" />
|
|
|
|
<div class="row mt-4">
|
2021-09-11 14:37:10 +00:00
|
|
|
<div class="col-md-3"><strong>Add to Group :</strong>
|
2020-02-09 21:32:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-5">
|
2021-09-11 14:37:10 +00:00
|
|
|
<input class="form-control" type="text" list="users" name="values" placeholder="User..." />
|
2021-07-12 15:08:56 +00:00
|
|
|
<datalist id="users">
|
2021-08-16 10:53:35 +00:00
|
|
|
{{range .PossibleNewMembers}}
|
|
|
|
<option value="{{.DN}}">{{.Name}}</option>
|
2021-07-12 15:08:56 +00:00
|
|
|
{{end}}
|
|
|
|
</datalist>
|
2020-02-09 21:32:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
2021-09-11 14:37:10 +00:00
|
|
|
<input type="submit" value="Add" class="form-control btn btn-success btn-sm" />
|
2020-02-09 21:32:59 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-02-09 21:06:33 +00:00
|
|
|
{{end}}
|
|
|
|
|
2020-02-09 21:43:24 +00:00
|
|
|
{{if .HasGroups}}
|
2020-02-09 21:32:59 +00:00
|
|
|
<hr class="mt-4" />
|
2021-09-11 14:37:10 +00:00
|
|
|
<h5 class="mt-4">Member of</h5>
|
2020-02-09 21:32:59 +00:00
|
|
|
<div class="container">
|
2020-02-09 21:06:33 +00:00
|
|
|
{{range .Groups}}
|
2020-02-09 21:32:59 +00:00
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-3">
|
2020-02-12 14:54:17 +00:00
|
|
|
<strong>{{.Name}}</strong>
|
2020-02-09 21:32:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-5">
|
|
|
|
<a href="/admin/ldap/{{.DN}}">{{.DN}}</a>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
2021-09-11 14:37:10 +00:00
|
|
|
<form method="POST" onsubmit="return confirm('Delete from Group ?');">
|
2020-02-09 21:32:59 +00:00
|
|
|
<input type="hidden" name="action" value="delete-from-group" />
|
|
|
|
<input type="hidden" name="group" value="{{.DN}}" />
|
|
|
|
<input type="submit" value="Supprimer" class="form-control btn btn-danger btn-sm" />
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-09 21:06:33 +00:00
|
|
|
{{end}}
|
2020-02-09 21:32:59 +00:00
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="action" value="add-to-group" />
|
|
|
|
<div class="row mt-4">
|
2021-09-11 14:37:10 +00:00
|
|
|
<div class="col-md-3"><strong>New group :</strong>
|
2020-02-09 21:32:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-5">
|
2021-09-11 14:37:10 +00:00
|
|
|
<input class="form-control" list="groups" type="text" name="group" placeholder="Group..." />
|
2021-07-12 15:08:56 +00:00
|
|
|
<datalist id="groups">
|
2021-08-16 10:53:35 +00:00
|
|
|
{{range .PossibleNewGroups}}
|
|
|
|
<option value="{{.DN}}">{{.Name}}</option>
|
2021-07-12 15:08:56 +00:00
|
|
|
{{end}}
|
|
|
|
</datalist>
|
2020-02-09 21:32:59 +00:00
|
|
|
</div>
|
|
|
|
<div class="col-md-2">
|
2021-09-11 14:37:10 +00:00
|
|
|
<input type="submit" value="Add" class="form-control btn btn-success btn-sm" />
|
2020-02-09 21:32:59 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-02-09 21:06:33 +00:00
|
|
|
{{end}}
|
|
|
|
|
2020-02-09 22:20:44 +00:00
|
|
|
{{if .CanDelete}}
|
|
|
|
<hr class="mt-4">
|
2021-09-11 14:37:10 +00:00
|
|
|
<h5 class="mt-4">Delete the Object</h5>
|
2020-02-09 22:20:44 +00:00
|
|
|
<div class="alert alert-danger">
|
2021-09-11 14:37:10 +00:00
|
|
|
Attention, this action is irreversible !
|
2020-02-09 22:20:44 +00:00
|
|
|
</div>
|
2021-09-11 14:37:10 +00:00
|
|
|
<form method="POST" onsubmit="return confirm('Do you REALLY want to delete this object forever ?');">
|
2020-02-09 22:20:44 +00:00
|
|
|
<div class="form-row">
|
|
|
|
<input type="hidden" name="action" value="delete-object" />
|
|
|
|
<div class="col-sm-5"></div>
|
2021-09-11 14:37:10 +00:00
|
|
|
<input type="submit" value="DELETE" class="form-control btn btn-danger col-sm-2" />
|
2020-02-09 22:20:44 +00:00
|
|
|
<div class="col-sm-5"></div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
{{end}}
|
|
|
|
|
2020-02-09 21:06:33 +00:00
|
|
|
<hr class="mt-4" />
|
|
|
|
|
|
|
|
{{end}}
|