Skip to content

Commit

Permalink
Change ctxpkg to appctx
Browse files Browse the repository at this point in the history
  • Loading branch information
javfg authored and labkode committed Oct 19, 2023
1 parent a06010f commit 634bf2f
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 18 deletions.
5 changes: 2 additions & 3 deletions eosprojects/eosprojects.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
"github.com/cs3org/reva"
"github.com/cs3org/reva/pkg/appctx"
ctxpkg "github.com/cs3org/reva/pkg/ctx"
"github.com/cs3org/reva/pkg/errtypes"
"github.com/cs3org/reva/pkg/rgrpc/todo/pool"
"github.com/cs3org/reva/pkg/rhttp/global"
Expand Down Expand Up @@ -152,7 +151,7 @@ func (e *eosProj) GetProjectsHandler(w http.ResponseWriter, r *http.Request) {

func (e *eosProj) GetProjectAdmins(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
user, ok := ctxpkg.ContextGetUser(ctx)
user, ok := appctx.ContextGetUser(ctx)
if !ok {
w.WriteHeader(http.StatusUnauthorized)
return
Expand Down Expand Up @@ -252,7 +251,7 @@ func (e *eosProj) getProjectAdmins(ctx context.Context, project string) ([]user,
}

func (e *eosProj) getProjects(ctx context.Context) ([]*project, error) {
user, ok := ctxpkg.ContextGetUser(ctx)
user, ok := appctx.ContextGetUser(ctx)
if !ok {
return nil, errtypes.UserRequired("")
}
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/bluele/gcache v0.0.2 // indirect
github.com/creasty/defaults v1.7.0 // indirect
github.com/cs3org/go-cs3apis v0.0.0-20230727093620-0f4399be4543 // indirect
github.com/cs3org/reva v1.26.0 // indirect
github.com/cs3org/reva v1.26.1-0.20231017095256-99498d005191 // indirect
github.com/disintegration/imaging v1.6.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/glpatcern/go-mime v0.0.0-20221026162842-2a8d71ad17a9 // indirect
Expand Down Expand Up @@ -62,12 +62,12 @@ require (
go.step.sm/crypto v0.36.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/image v0.13.0 // indirect
golang.org/x/net v0.16.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
google.golang.org/genproto v0.0.0-20231009173412-8bfb1ae86b6c // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect
google.golang.org/grpc v1.58.2 // indirect
google.golang.org/grpc v1.58.3 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ github.com/cs3org/go-cs3apis v0.0.0-20230727093620-0f4399be4543 h1:IFo6dj0XEOIA6
github.com/cs3org/go-cs3apis v0.0.0-20230727093620-0f4399be4543/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva v1.26.0 h1:61aZSWJo/b3M3i7QTriqn41Mhqd/JyETYD9V3c4kmjc=
github.com/cs3org/reva v1.26.0/go.mod h1:RkHcrfhVpQMjjRMdraBbtBkv2Bkl3s+I0ZWk3ksqjYQ=
github.com/cs3org/reva v1.26.1-0.20231017095256-99498d005191 h1:IEnckSn0fij7Y3wNbHh3thx6UMJTfAQVtBpgpSpcIgM=
github.com/cs3org/reva v1.26.1-0.20231017095256-99498d005191/go.mod h1:EgueoCAGltPibRBSABu9fwMm9qPzJPtrzJ+UDkav0ho=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -226,6 +228,7 @@ golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos=
golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.12.0 h1:smVPGxink+n1ZI5pkQa8y6fZT0RW0MgCO5bFpepy4B4=
golang.org/x/oauth2 v0.12.0/go.mod h1:A74bZ3aGXgCY0qaIC9Ahg6Lglin4AMAco8cIv9baba4=
Expand Down Expand Up @@ -305,6 +308,7 @@ google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I=
google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand Down
Loading

0 comments on commit 634bf2f

Please sign in to comment.