Skip to content

Commit 062e0c3

Browse files
committed
fix[api]: allow all authenticated users to list business hours.
Replaced `perm(..., "business_hours:manage")` with `auth(...)` on GET /api/v1/business-hours since listing hours isn’t a sensitive action and is required in the general settings tab
1 parent 67090fb commit 062e0c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ func initHandlers(g *fastglue.Fastglue, hub *ws.Hub) {
170170
g.DELETE("/api/v1/templates/{id}", perm(handleDeleteTemplate, "templates:manage"))
171171

172172
// Business hours.
173-
g.GET("/api/v1/business-hours", perm(handleGetBusinessHours, "business_hours:manage"))
173+
g.GET("/api/v1/business-hours", auth(handleGetBusinessHours))
174174
g.GET("/api/v1/business-hours/{id}", perm(handleGetBusinessHour, "business_hours:manage"))
175175
g.POST("/api/v1/business-hours", perm(handleCreateBusinessHours, "business_hours:manage"))
176176
g.PUT("/api/v1/business-hours/{id}", perm(handleUpdateBusinessHours, "business_hours:manage"))

0 commit comments

Comments
 (0)