Bind permissions to roles and scope operator access by branch.

Replace permission_user with permission_role, enforce RBAC on admin routes, and limit operators to their assigned branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-24 18:24:43 +05:00
parent 427d5b4e07
commit 1fd0abbcb2
57 changed files with 1281 additions and 657 deletions

View File

@@ -242,7 +242,7 @@ func (h *handler) refreshToken(c *gin.Context) {
// getProfile godoc
// @Summary Get profile
// @Description Returns the authenticated user's profile with role and branches
// @Description Returns the authenticated user's profile with role, branches, and permissions
// @Tags auth
// @Produce json
// @Security BearerAuth