diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-23 11:50:42 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-23 11:50:42 -0600 |
| commit | 944ef4ca499fe27a57d4cd3c21bccb99508526ca (patch) | |
| tree | 3c929141ee07fc2a4f2c2b825630cb2ad3121b44 /app/controllers/sparkles | |
| parent | 8a1b03afb949a5a3be6a78e9b2c88d2e48643f46 (diff) | |
refactor: Update RequirePermission middleware to connect to spicedb CheckPermission API
Diffstat (limited to 'app/controllers/sparkles')
| -rw-r--r-- | app/controllers/sparkles/controller.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/sparkles/controller.go b/app/controllers/sparkles/controller.go index 0b86c7e..7e6975c 100644 --- a/app/controllers/sparkles/controller.go +++ b/app/controllers/sparkles/controller.go @@ -25,7 +25,7 @@ func (c *Controller) MountTo(mux *http.ServeMux) { mux.Handle("POST /sparkles", x.Middleware[http.Handler]( http.HandlerFunc(c.Create), middleware.RequireUser(), - // middleware.RequirePermission("create_sparkle", ioc.MustResolve[rpc.Ability](ioc.Default)), + // middleware.RequirePermission("create", x.Try(ioc.Resolve[authz.CheckPermission](ioc.Default))), )) // This is a temporary endpoint to restore a backup |
