mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-04 13:51:30 +00:00
fix: allow setup-code bootstrap auth for operator pairing
This commit is contained in:
@@ -11,8 +11,8 @@ export type DeviceBootstrapProfileInput = {
|
||||
};
|
||||
|
||||
export const PAIRING_SETUP_BOOTSTRAP_PROFILE: DeviceBootstrapProfile = {
|
||||
roles: ["node"],
|
||||
scopes: [],
|
||||
roles: ["node", "operator"],
|
||||
scopes: ["operator.read", "operator.talk.secrets", "operator.write"],
|
||||
};
|
||||
|
||||
function normalizeBootstrapRoles(roles: readonly string[] | undefined): string[] {
|
||||
@@ -37,15 +37,3 @@ export function normalizeDeviceBootstrapProfile(
|
||||
scopes: normalizeDeviceAuthScopes(input?.scopes ? [...input.scopes] : []),
|
||||
};
|
||||
}
|
||||
|
||||
export function sameDeviceBootstrapProfile(
|
||||
left: DeviceBootstrapProfile,
|
||||
right: DeviceBootstrapProfile,
|
||||
): boolean {
|
||||
return (
|
||||
left.roles.length === right.roles.length &&
|
||||
left.scopes.length === right.scopes.length &&
|
||||
left.roles.every((value, index) => value === right.roles[index]) &&
|
||||
left.scopes.every((value, index) => value === right.scopes[index])
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user