add write mutex on acl is allowed

This commit is contained in:
abhishek9686 2024-03-27 14:32:22 +07:00
parent e90c7386de
commit 4cae1b0bb4

View file

@ -64,9 +64,9 @@ func (acl ACL) Save(containerID ContainerID, ID AclID) (ACL, error) {
// ACL.IsAllowed - sees if ID is allowed in referring ACL
func (acl ACL) IsAllowed(ID AclID) (allowed bool) {
AclMutex.RLock()
AclMutex.Lock()
allowed = acl[ID] == Allowed
AclMutex.RUnlock()
AclMutex.Unlock()
return
}