mirror of
https://github.com/jech/galene.git
synced 2024-11-22 08:35:57 +01:00
Add canChangePassword to group status.
This commit is contained in:
parent
39d11c2f48
commit
077ff9a879
1 changed files with 22 additions and 15 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue