Add macOS companion node status and system.nodes APIs
This commit is contained in:
@@ -186,5 +186,17 @@ describe('authorizeNodeMethod', () => {
|
||||
roleScopes: { companion: ['node.capabilities.get', 'node.location.set'] },
|
||||
});
|
||||
expect(allowedLocation.authenticated).toBe(true);
|
||||
|
||||
const deniedStatus = authorizeNodeMethod({
|
||||
enabled: true,
|
||||
method: 'node.status.set',
|
||||
nodeRole: 'observer',
|
||||
allowedRoles: ['companion', 'observer'],
|
||||
roleScopes: {
|
||||
companion: ['node.capabilities.get', 'node.status.set'],
|
||||
observer: ['node.capabilities.get'],
|
||||
},
|
||||
});
|
||||
expect(deniedStatus.authenticated).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user