From e8f99a9832521ee9afa6afc55c33f16db6fc5736 Mon Sep 17 00:00:00 2001 From: mpl Date: Tue, 15 Apr 2014 01:40:52 +0200 Subject: [PATCH] auth: fix OpUpload bitmask check Change-Id: I7cc3487637c657762a28cb5aeb4abb253bbd1149 --- pkg/auth/auth.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index 09c6c0ed3..3290796aa 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -272,7 +272,7 @@ func IsLocalhost(req *http.Request) bool { // Allowed returns whether the given request // has access to perform all the operations in op. func Allowed(req *http.Request, op Operation) bool { - if op|OpUpload != 0 { + if op&OpUpload != 0 { // upload (at least from camput) requires stat and get too op = op | OpVivify }