移除这个没用的权限
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m12s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 8m12s
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
DO $$
|
|
||||||
BEGIN
|
|
||||||
IF EXISTS (
|
|
||||||
SELECT 1
|
|
||||||
FROM tb_role_permission rp
|
|
||||||
JOIN tb_permission p ON p.id = rp.perm_id
|
|
||||||
WHERE p.perm_code = 'shop:credit-limit:manage'
|
|
||||||
AND rp.deleted_at IS NULL
|
|
||||||
) THEN
|
|
||||||
RAISE EXCEPTION '店铺实际信用额度权限已分配,禁止回滚权限定义';
|
|
||||||
END IF;
|
|
||||||
END
|
|
||||||
$$;
|
|
||||||
|
|
||||||
DELETE FROM tb_permission
|
|
||||||
WHERE perm_code = 'shop:credit-limit:manage'
|
|
||||||
AND deleted_at IS NULL;
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
INSERT INTO tb_permission (
|
|
||||||
created_at, updated_at, creator, updater, perm_name, perm_code,
|
|
||||||
perm_type, platform, available_for_role_types, url, parent_id, sort, status
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NOW(), NOW(), 0, 0, '调整店铺实际信用额度', 'shop:credit-limit:manage',
|
|
||||||
2, 'web', '1', '/api/admin/shops/:id/credit-limit', NULL, 0, 1
|
|
||||||
)
|
|
||||||
ON CONFLICT (perm_code) WHERE deleted_at IS NULL
|
|
||||||
DO UPDATE SET
|
|
||||||
perm_name = EXCLUDED.perm_name,
|
|
||||||
perm_type = EXCLUDED.perm_type,
|
|
||||||
platform = EXCLUDED.platform,
|
|
||||||
available_for_role_types = EXCLUDED.available_for_role_types,
|
|
||||||
url = EXCLUDED.url,
|
|
||||||
status = EXCLUDED.status,
|
|
||||||
updated_at = NOW();
|
|
||||||
Reference in New Issue
Block a user