fix(api): fix invalid resource control check (#3225)

pull/3091/head
Anthony Lapenna 5 years ago committed by GitHub
parent b7c38b9569
commit 1fbe6a12f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -361,7 +361,7 @@ func (p *proxyTransport) restrictedOperation(request *http.Request, resourceID s
} }
resourceControl := getResourceControlByResourceID(resourceID, resourceControls) resourceControl := getResourceControlByResourceID(resourceID, resourceControls)
if resourceControl != nil && !canUserAccessResource(tokenData.ID, userTeamIDs, resourceControl) { if resourceControl == nil || !canUserAccessResource(tokenData.ID, userTeamIDs, resourceControl) {
return writeAccessDeniedResponse() return writeAccessDeniedResponse()
} }
} }

Loading…
Cancel
Save