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

Unified Diff: scheduler/appengine/ui/job.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/ui/invocation.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scheduler/appengine/ui/job.go
diff --git a/scheduler/appengine/ui/job.go b/scheduler/appengine/ui/job.go
index 941a4a7cf6608226e16314559590e65b8858c50c..91e1d902c720598d65582fe5694661a23102d358 100644
--- a/scheduler/appengine/ui/job.go
+++ b/scheduler/appengine/ui/job.go
@@ -23,7 +23,7 @@ import (
mc "github.com/luci/gae/service/memcache"
"github.com/luci/luci-go/common/clock"
- "github.com/luci/luci-go/scheduler/appengine/presentation"
+ "github.com/luci/luci-go/scheduler/appengine/acl"
"github.com/luci/luci-go/server/auth"
"github.com/luci/luci-go/server/router"
"github.com/luci/luci-go/server/templates"
@@ -103,7 +103,7 @@ func runJobAction(ctx *router.Context) {
projectID := p.ByName("ProjectID")
jobName := p.ByName("JobName")
- if !presentation.IsJobOwner(c, projectID, jobName) {
+ if !acl.IsJobOwner(c, projectID, jobName) {
http.Error(w, "Forbidden", 403)
return
}
@@ -181,7 +181,7 @@ func abortJobAction(c *router.Context) {
func handleJobAction(c *router.Context, cb func(string) error) {
projectID := c.Params.ByName("ProjectID")
jobName := c.Params.ByName("JobName")
- if !presentation.IsJobOwner(c.Context, projectID, jobName) {
+ if !acl.IsJobOwner(c.Context, projectID, jobName) {
http.Error(c.Writer, "Forbidden", 403)
return
}
« no previous file with comments | « scheduler/appengine/ui/invocation.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698