@@ -476,16 +476,19 @@ describe('[#20083] parity: can() over the member\'s map answers what checkObject
476476 } ) ;
477477 }
478478
479- it ( '[#20136] the reported case, spelled out: the walled org admin may not write its RBAC rows, and can() says so' , async ( ) => {
479+ // [ADR-0090 D12, amended 2026-10-17] Since the organization boundary the
480+ // walled org admin creates and removes assignment rows (the gate bounds
481+ // which), and still never edits one — the object grant and can() agree.
482+ it ( '[#20136] the reported case, spelled out: the walled org admin may not EDIT its RBAC rows, and can() says so' , async ( ) => {
480483 const context = { userId : USER . id } ;
481484 for ( const label of [ '[#20136 row a] walled org admin' , '[#20136 row b] walled org admin WITHOUT member_default' ] ) {
482485 const sets = SUBJECTS [ label ] ;
483486 const { svc, plugin } = await locate ( { schemas : REGISTERED } ) ;
484487 vi . spyOn ( plugin as any , 'resolvePermissionSetsForContext' ) . mockResolvedValue ( sets ) ;
485488 const permissions = toEvalPermissions ( await svc . getEffectiveObjectPermissions ! ( context ) ) ;
486- for ( const [ verb , operation ] of [ [ 'edit' , 'update' ] , [ 'create' , 'insert' ] , [ 'delete' , 'delete' ] ] as const ) {
487- expect ( evaluator . checkObjectPermission ( operation , SysUserPosition . name , sets ) , `${ label } ${ verb } ` ) . toBe ( false ) ;
488- expect ( can ( permissions , SysUserPosition . name , verb ) , `${ label } ${ verb } ` ) . toBe ( false ) ;
489+ for ( const [ verb , operation , granted ] of [ [ 'edit' , 'update' , false ] , [ 'create' , 'insert' , true ] , [ 'delete' , 'delete' , true ] ] as const ) {
490+ expect ( evaluator . checkObjectPermission ( operation , SysUserPosition . name , sets ) , `${ label } ${ verb } ` ) . toBe ( granted ) ;
491+ expect ( can ( permissions , SysUserPosition . name , verb ) , `${ label } ${ verb } ` ) . toBe ( granted ) ;
489492 }
490493 // …and still reads them, on both sides.
491494 expect ( evaluator . checkObjectPermission ( 'find' , SysUserPosition . name , sets ) ) . toBe ( true ) ;
0 commit comments