Skip to content

Commit

Permalink
debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-goenka committed Dec 30, 2024
1 parent 1a5f35f commit b6ab3cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bundle/config/validate/validate_artifact_path.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,15 @@ the artifact_path.`,
// The user needs to have either WRITE_VOLUME or ALL_PRIVILEGES to write to the volume.
canWrite := slices.Contains(allPrivileges, catalog.PrivilegeWriteVolume) || slices.Contains(allPrivileges, catalog.PrivilegeAllPrivileges)
if !canWrite {
log.Infof(ctx, "Current privileges on Volume at artifact_path: %v", allPrivileges)
log.Debugf(ctx, "Current privileges on Volume at artifact_path: %v", allPrivileges)
return wrapErrorMsg(fmt.Sprintf("user does not have WRITE_VOLUME grant on volume %s", volumeFullName))
}

// READ_VOLUME is implied since the user was able to fetch the associated grants with the volume.
// We still add this explicit check out of caution incase the API behavior changes in the future.
canRead := slices.Contains(allPrivileges, catalog.PrivilegeReadVolume) || slices.Contains(allPrivileges, catalog.PrivilegeAllPrivileges)
if !canRead {
log.Infof(ctx, "Current privileges on Volume at artifact_path: %v", allPrivileges)
log.Debugf(ctx, "Current privileges on Volume at artifact_path: %v", allPrivileges)
return wrapErrorMsg(fmt.Sprintf("user does not have READ_VOLUME grant on volume %s", volumeFullName))
}

Expand Down

0 comments on commit b6ab3cf

Please sign in to comment.