mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35: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
|
||||
}
|
||||
|
||||
override := c.OverridePermissions(g)
|
||||
|
||||
g.mu.Lock()
|
||||
defer g.mu.Unlock()
|
||||
|
||||
if(!c.OverridePermissions(g)) {
|
||||
perms, err := g.description.GetPermission(c.Credentials())
|
||||
if !override && err != nil {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
c.SetPermissions(perms)
|
||||
|
||||
if !override {
|
||||
if !perms.Op && g.locked != nil {
|
||||
m := *g.locked
|
||||
if m == "" {
|
||||
|
|
Loading…
Reference in a new issue