changed role permission
This commit is contained in:
1 parent
f0ecf23879
commit
323e131216
74 files changed
+2915
-4713
No files matched your search
@@ -153,7 +153,7 @@ func (r *repository) activeCardsMetric(ctx context.Context, branchIds []int64, w
|
||||
}
|
||||
|
||||
func (r *repository) activeCustomersMetric(ctx context.Context, branchIds []int64, win periodWindow) (dashboard.StatMetricDTO, error) {
|
||||
where := " AND u.role = 'user' AND u.active = true"
|
||||
where := " AND u.role_id = (SELECT id FROM roles WHERE code = 'user' AND deleted_at IS NULL) AND u.active = true"
|
||||
var extra []interface{}
|
||||
if len(branchIds) > 0 {
|
||||
extra = append(extra, branchIds)
|
||||
|
||||
Reference in new issue
Block a user