Commit 077ff9a8 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Add canChangePassword to group status.

parent 39d11c2f
......@@ -1041,6 +1041,7 @@ type Status struct {
AuthPortal string `json:"authPortal,omitempty"`
Locked bool `json:"locked,omitempty"`
ClientCount *int `json:"clientCount,omitempty"`
CanChangePassword bool `json:"canChangePassword,omitempty"`
}
// Status returns a group's status.
......@@ -1097,6 +1098,12 @@ func (g *Group) Status(authentified bool, base *url.URL) Status {
d.Locked = locked
d.ClientCount = &count
}
if authentified {
conf, err := GetConfiguration()
if err == nil {
d.CanChangePassword = conf.WritableGroups
}
}
return d
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment