mirror of
https://github.com/jech/galene.git
synced 2024-11-22 16:45: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()
|
||||||
|
|
||||||
perms, err := g.description.GetPermission(c.Credentials())
|
if(!c.OverridePermissions(g)) {
|
||||||
if !override && err != nil {
|
perms, err := g.description.GetPermission(c.Credentials())
|
||||||
return nil, err
|
if err != nil {
|
||||||
}
|
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