mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-21 19:25:52 +08:00
add write mutex on acl is allowed
This commit is contained in:
parent
e90c7386de
commit
4cae1b0bb4
1 changed files with 2 additions and 2 deletions
|
@ -64,9 +64,9 @@ func (acl ACL) Save(containerID ContainerID, ID AclID) (ACL, error) {
|
||||||
|
|
||||||
// ACL.IsAllowed - sees if ID is allowed in referring ACL
|
// ACL.IsAllowed - sees if ID is allowed in referring ACL
|
||||||
func (acl ACL) IsAllowed(ID AclID) (allowed bool) {
|
func (acl ACL) IsAllowed(ID AclID) (allowed bool) {
|
||||||
AclMutex.RLock()
|
AclMutex.Lock()
|
||||||
allowed = acl[ID] == Allowed
|
allowed = acl[ID] == Allowed
|
||||||
AclMutex.RUnlock()
|
AclMutex.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue