fix(supabase): V1-2.1 owner self-review grant and the text size measure
M6 option A: grant_catalog_right no longer refuses an owner granting itself sheet_reviewer; authors stay refused at acknowledgment, approval and publication. The document cap is the UTF-8 bytes of the JSON text: check_document_structure drops pg_column_size and M5 replaces the base table CHECK by octet_length(content::text). pgTAP 015 and 017 cover the owner-reviewer journey and cap - 1, cap, cap + 1, multi-byte, dense.
This commit is contained in:
1 parent
2af61e72cc
commit
b1de87b5d0
6 files changed
+131
-34
No files matched your search
@@ -162,10 +162,11 @@ select lives_ok(
|
||||
select throws_ok(
|
||||
$$ select public.grant_catalog_right('d0000000-0000-0000-0000-00000000000c','sheet_reviewer','partner','DVM verified') $$,
|
||||
'P0001', 'grant.ineligible', 'a capability is refused to an account without a verified factor');
|
||||
-- the owner cannot grant itself sheet_reviewer
|
||||
select throws_ok(
|
||||
-- the owner (aal2, verified factor) may grant itself sheet_reviewer (M6 option A);
|
||||
-- the separation of duties is per round (017)
|
||||
select lives_ok(
|
||||
$$ select public.grant_catalog_right('d0000000-0000-0000-0000-000000000001','sheet_reviewer','self','x') $$,
|
||||
'P0001', 'grant.self_review', 'the owner cannot review its own drafts');
|
||||
'the owner grants itself sheet_reviewer');
|
||||
|
||||
-- grant_active reflects eligibility, expiry and revocation (checked as the
|
||||
-- table owner: grant_active is internal, not granted to any API role).
|
||||
|
||||
Reference in new issue
Block a user