grantHostAccess method
userId got the capability terminal on host hostId: the personal access.changed
with the host in added (04 8.2).
Implementation
void grantHostAccess(String userId, String hostId) {
append(
'access.changed',
resource: {'kind': 'principal', 'id': userId},
payload: {
'permission_version': permissionVersion,
'added': [
{
'kind': 'host',
'id': hostId,
'capabilities': ['terminal'],
},
],
'removed': <Object?>[],
'changed': <Object?>[],
},
audience: userId,
);
}