Revert "fix(api): fix invalid resource control check (#3225)" (#3327)

This reverts commit 1fbe6a12f1.
pull/3328/head
Anthony Lapenna 5 years ago committed by GitHub
parent c559b6b55c
commit 03d9d6afbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save