mirror of
https://github.com/jech/galene.git
synced 2024-11-23 00:55:58 +01:00
Don't set permissions if clients overrides.
This commit is contained in:
parent
1ed2540bd7
commit
4b420e5bd6
1 changed files with 6 additions and 8 deletions
|
@ -269,19 +269,17 @@ func AddClient(name string, c Client) (*Group, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
override := c.OverridePermissions(g)
|
|
||||||
|
|
||||||
g.mu.Lock()
|
g.mu.Lock()
|
||||||
defer g.mu.Unlock()
|
defer g.mu.Unlock()
|
||||||
|
|
||||||
|
if(!c.OverridePermissions(g)) {
|
||||||
perms, err := g.description.GetPermission(c.Credentials())
|
perms, err := g.description.GetPermission(c.Credentials())
|
||||||
if !override && err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
c.SetPermissions(perms)
|
c.SetPermissions(perms)
|
||||||
|
|
||||||
if !override {
|
|
||||||
if !perms.Op && g.locked != nil {
|
if !perms.Op && g.locked != nil {
|
||||||
m := *g.locked
|
m := *g.locked
|
||||||
if m == "" {
|
if m == "" {
|
||||||
|
|
Loading…
Reference in a new issue