Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1631)

Unified Diff: scheduler/appengine/apiservers/scheduler.go

Issue 2976623002: scheduler: Move IsJobOwner to acl package. (Closed)
Patch Set: missing Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « scheduler/appengine/acl/acl.go ('k') | scheduler/appengine/presentation/acl.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/appengine/apiservers/scheduler.go
diff --git a/scheduler/appengine/apiservers/scheduler.go b/scheduler/appengine/apiservers/scheduler.go
index 9173833523f269ce98f0c5b587051b9de34931a5..64500e61a26573447abe896b2396a39c09263416 100644
--- a/scheduler/appengine/apiservers/scheduler.go
+++ b/scheduler/appengine/apiservers/scheduler.go
@@ -16,6 +16,7 @@ package apiservers
import (
"github.com/luci/luci-go/scheduler/api/scheduler/v1"
+ "github.com/luci/luci-go/scheduler/appengine/acl"
"github.com/luci/luci-go/scheduler/appengine/catalog"
"github.com/luci/luci-go/scheduler/appengine/engine"
"github.com/luci/luci-go/scheduler/appengine/presentation"
@@ -146,7 +147,7 @@ func (s SchedulerServer) AbortInvocation(ctx context.Context, in *scheduler.Invo
//// Private helpers.
func runAction(ctx context.Context, jobRef *scheduler.JobRef, action func() error) (*empty.Empty, error) {
- if !presentation.IsJobOwner(ctx, jobRef.GetProject(), jobRef.GetJob()) {
+ if !acl.IsJobOwner(ctx, jobRef.GetProject(), jobRef.GetJob()) {
return nil, grpc.Errorf(codes.PermissionDenied, "No permission to execute action")
}
switch err := action(); {
« no previous file with comments | « scheduler/appengine/acl/acl.go ('k') | scheduler/appengine/presentation/acl.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698