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:
@@ -7,6 +7,7 @@ var (
|
||||
ErrUnauthorized = NewAppError(nil, "Invalid credentials or unauthorized access.", "SE-00002")
|
||||
ErrNotFound = NewAppError(nil, "The requested resource was not found.", "SE-00003")
|
||||
ErrInternalServer = NewAppError(nil, "An internal server error occurred. Please try again later.", "SE-00004")
|
||||
ErrForbidden = NewAppError(nil, "Sana rugsat yok.", "SE-00011")
|
||||
ErrNotAcceptable = NewAppError(nil, "The request could not be processed.", "SE-00007")
|
||||
ErrConflict = NewAppError(nil, "A user with this phone or username already exists.", "SE-00008")
|
||||
ErrInvalidCode = NewAppError(nil, "Invalid or expired verification code.", "SE-00009")
|
||||
|
||||
Reference in New Issue
Block a user