Skip to content

Commit

Permalink
Move variable inside if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneMPutnam committed Jun 17, 2024
1 parent fc43cf0 commit dc2feb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blobstore/blobhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,9 @@ func (bh *BlobHandler) PingWithAuth(c echo.Context) error {

func (bh *BlobHandler) GetS3ReadPermissions(c echo.Context, bucket string) ([]string, bool, int, error) {
permissions, fullAccess, err := bh.GetUserS3ReadListPermission(c, bucket)
httpStatus := http.StatusInternalServerError
if err != nil {
//TEMP solution before error library is implimented and string check ups become redundant
httpStatus := http.StatusInternalServerError
if strings.Contains(err.Error(), "this endpoint requires authentication information that is unavailable when authorization is disabled.") {
httpStatus = http.StatusForbidden
}
Expand Down

0 comments on commit dc2feb9

Please sign in to comment.