mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Add business team access controls and customer role filters.
Super-admins can assign Admin; owners/admins manage Editor/Viewer via team/access, and the customers list supports all/customers/managers filtering. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
2c4d02bd0e
commit
e59db25814
@@ -0,0 +1,13 @@
|
||||
-- Business team admins can manage non-admin staff (invite / update / remove).
|
||||
-- Owners keep full team.* ; editors/viewers stay without team management.
|
||||
|
||||
INSERT INTO role_permissions (role_id, permission_id)
|
||||
SELECT r.id, p.id
|
||||
FROM roles r
|
||||
JOIN permissions p ON p.slug IN (
|
||||
'business.team.invite',
|
||||
'business.team.update',
|
||||
'business.team.remove'
|
||||
)
|
||||
WHERE r.slug = 'admin'
|
||||
ON CONFLICT DO NOTHING;
|
||||
Reference in New Issue
Block a user