aboutsummaryrefslogtreecommitdiff
path: root/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'admin.go')
-rw-r--r--admin.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/admin.go b/admin.go
index 870439f..7806cfd 100644
--- a/admin.go
+++ b/admin.go
@@ -164,6 +164,7 @@ type PropValues struct {
Name string
Values []string
Editable bool
+ Deletable bool
}
func handleAdminLDAP(w http.ResponseWriter, r *http.Request) {
@@ -342,10 +343,18 @@ func handleAdminLDAP(w http.ResponseWriter, r *http.Request) {
break
}
}
+ deletable := true
+ for _, restricted := range []string{ "displayname", "objectclass", "structuralobjectclass" } {
+ if strings.EqualFold(attr.Name, restricted) {
+ deletable = false
+ break
+ }
+ }
props[name_lower] = &PropValues{
Name: attr.Name,
Values: attr.Values,
Editable: editable,
+ Deletable: deletable,
}
}
}