Parcourir la source

add write mutex on acl is allowed

(cherry picked from commit 4cae1b0bb4b4b608fdb76b3ef49c7fd7390c9ccb)
abhishek9686 il y a 1 an
Parent
commit
ce4f4e34bf
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      logic/acls/common.go

+ 2 - 2
logic/acls/common.go

@@ -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
 }