diff --git a/cmd/root.go b/cmd/root.go index f92af49..6339582 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -182,7 +182,6 @@ func (s *WebSrv) Start(ctx context.Context, ready server.ReadyFunc, run server.R } app.Get("/", handlers.Dashboard()) - app.Post("/", handlers.PostDashboard()) app.Get("/login", htmx.NewCompFuncHandler(userHandler.Login(), compFuncConfig)) app.Get("/login/:provider", goth.NewBeginAuthHandler(gothConfig)) app.Get("/auth/:provider/callback", goth.NewCompleteAuthHandler(gothConfig)) diff --git a/internal/adapters/handlers/handlers.go b/internal/adapters/handlers/handlers.go index 32c7384..ec49d80 100644 --- a/internal/adapters/handlers/handlers.go +++ b/internal/adapters/handlers/handlers.go @@ -606,13 +606,6 @@ func (a *handlers) DeleteWorkflow() fiber.Handler { }) } -// PostDashboard ... -func (a *handlers) PostDashboard() fiber.Handler { - return htmx.NewHxControllerHandler(func() htmx.Controller { - return dashboard.NewShowDashboardController(a.store) - }) -} - // DeleteTemplate ... func (a *handlers) DeleteTemplate() fiber.Handler { return htmx.NewHxControllerHandler(func() htmx.Controller { diff --git a/internal/utils/iam.go b/internal/utils/iam.go deleted file mode 100644 index 2af2eef..0000000 --- a/internal/utils/iam.go +++ /dev/null @@ -1,31 +0,0 @@ -package utils - -import authz "github.com/zeiss/fiber-authz" - -const ( - // PermissionAdmin grants all permissions on a team - PermissionAdmin = authz.AuthzAction("admin") - // PermissionSuperAdmin grants all permissions - PermissionSuperAdmin = authz.AuthzAction("superadmin") - // PermissionCreate grants the ability to create - PermissionCreate = authz.AuthzAction("create") - // PermissionDelete grants the ability to delete - PermissionDelete = authz.AuthzAction("delete") - // PermissionEdit grants the ability to edit - PermissionEdit = authz.AuthzAction("edit") - // PermissionView grants the ability to read - PermissionView = authz.AuthzAction("view") -) - -const ( - // RoleAdmin grants all permissions on a team - RoleAdmin = authz.AuthzAction("Admin") - // RoleSuperAdmin grants all permissions - RoleSuperAdmin = authz.AuthzAction("Super Admin") - // RoleOwner grants all permissions - RoleOwner = authz.AuthzAction("Owner") - // Editor grants the ability to edit - RoleEditor = authz.AuthzAction("Editor") - // RoleViewer grants the ability to read - RoleViewer = authz.AuthzAction("Viewer") -)