Skip to content

Commit

Permalink
Revert "master: Add permission for /client/vol"
Browse files Browse the repository at this point in the history
This reverts commit a5015ab.

Signed-off-by: shengyong002 <[email protected]>
  • Loading branch information
shengyong002 committed Dec 6, 2021
1 parent a5015ab commit 5a4a9d8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions master/api_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1976,7 +1976,6 @@ func (m *Server) getVol(w http.ResponseWriter, r *http.Request) {
ticket cryptoutil.Ticket
ts int64
param *getVolParameter
signs []*proto.AuthSignature
)
if param, err = parseGetVolParameter(r); err != nil {
sendErrReply(w, r, &proto.HTTPReply{Code: proto.ErrCodeParamError, Msg: err.Error()})
Expand All @@ -1986,16 +1985,6 @@ func (m *Server) getVol(w http.ResponseWriter, r *http.Request) {
sendErrReply(w, r, newErrHTTPReply(proto.ErrVolNotExists))
return
}
if !vol.authenticate && m.enableSimpleAuth() {
if signs, err = m.parseSignatures(r); err != nil {
sendErrReply(w, r, &proto.HTTPReply{Code: proto.ErrCodeParamError, Msg: err.Error()})
return
}
if err = m.verifySignatures(signs, r.URL.EscapedPath(), param.name, AuthAccessorPermission); err != nil {
sendErrReply(w, r, &proto.HTTPReply{Code: proto.ErrCodeNoPermission, Msg: err.Error()})
return
}
}
if !param.skipOwnerValidation && !matchKey(vol.Owner, param.authKey) {
sendErrReply(w, r, newErrHTTPReply(proto.ErrVolAuthKeyNotMatch))
return
Expand Down

0 comments on commit 5a4a9d8

Please sign in to comment.