Add backups, currencies and dashboard APIs, and scope access by guard_name.
Web users may only CRUD their own records, operators stay in assigned branches, and admin/manager/superadmin keep full access. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0d000f9af6
commit
28509eb4ca
65 files changed
+9132
-296
No files matched your search
@@ -128,6 +128,11 @@ func buildListQuery(filter loanpaidletter.ListFilter) (whereClause string, args
|
||||
conditions = append(conditions, fmt.Sprintf("l.status = $%d", len(args)))
|
||||
}
|
||||
|
||||
if filter.UserId != nil {
|
||||
args = append(args, *filter.UserId)
|
||||
conditions = append(conditions, fmt.Sprintf("l.user_id = $%d", len(args)))
|
||||
}
|
||||
|
||||
if len(filter.BranchIds) > 0 {
|
||||
conditions, args = rbac.AppendBranchIDs(conditions, args, "l.branch_id", filter.BranchIds)
|
||||
} else if filter.BranchId != nil {
|
||||
|
||||
Reference in new issue
Block a user