@@ -201,7 +201,9 @@ export function registerControlUiAndPairingSuite(): void {
201201 displayName : params . displayName ,
202202 platform : params . platform ,
203203 } ) ;
204- await approveDevicePairing ( seeded . request . requestId ) ;
204+ await approveDevicePairing ( seeded . request . requestId , {
205+ callerScopes : [ "operator.admin" ] ,
206+ } ) ;
205207 return { identityPath, identity : { deviceId : identity . deviceId } } ;
206208 } ;
207209
@@ -761,7 +763,9 @@ export function registerControlUiAndPairingSuite(): void {
761763 if ( ! pendingForTestDevice [ 0 ] ) {
762764 throw new Error ( "expected pending pairing request" ) ;
763765 }
764- await approveDevicePairing ( pendingForTestDevice [ 0 ] . requestId ) ;
766+ await approveDevicePairing ( pendingForTestDevice [ 0 ] . requestId , {
767+ callerScopes : pendingForTestDevice [ 0 ] . scopes ?? [ "operator.admin" ] ,
768+ } ) ;
765769
766770 const paired = await getPairedDevice ( identity . deviceId ) ;
767771 expect ( paired ?. roles ) . toEqual ( expect . arrayContaining ( [ "node" , "operator" ] ) ) ;
@@ -843,7 +847,9 @@ export function registerControlUiAndPairingSuite(): void {
843847 displayName : "legacy-test" ,
844848 platform : "test" ,
845849 } ) ;
846- await approveDevicePairing ( pending . request . requestId ) ;
850+ await approveDevicePairing ( pending . request . requestId , {
851+ callerScopes : pending . request . scopes ?? [ "operator.admin" ] ,
852+ } ) ;
847853
848854 await stripPairedMetadataRolesAndScopes ( deviceId ) ;
849855
0 commit comments