Commit 4b420e5b authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't set permissions if clients overrides.

parent 1ed2540b
......@@ -269,19 +269,17 @@ func AddClient(name string, c Client) (*Group, error) {
return nil, err
}
override := c.OverridePermissions(g)
g.mu.Lock()
defer g.mu.Unlock()
perms, err := g.description.GetPermission(c.Credentials())
if !override && err != nil {
return nil, err
}
if(!c.OverridePermissions(g)) {
perms, err := g.description.GetPermission(c.Credentials())
if err != nil {
return nil, err
}
c.SetPermissions(perms)
c.SetPermissions(perms)
if !override {
if !perms.Op && g.locked != nil {
m := *g.locked
if m == "" {
......
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