@makolabs/ripple 1.2.23 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -384,11 +384,12 @@ export const updateUserPermissions = command('unchecked', async (options) => {
|
|
|
384
384
|
});
|
|
385
385
|
export const generateApiKey = command('unchecked', async (options) => {
|
|
386
386
|
try {
|
|
387
|
-
|
|
387
|
+
let filteredPermissions = PERMISSION_PREFIX
|
|
388
388
|
? options.permissions.filter((scope) => scope.startsWith(PERMISSION_PREFIX))
|
|
389
389
|
: options.permissions;
|
|
390
|
-
if (
|
|
391
|
-
|
|
390
|
+
// Default to readonly permission if none provided (first-time key generation)
|
|
391
|
+
if (filteredPermissions.length === 0 && PERMISSION_PREFIX) {
|
|
392
|
+
filteredPermissions = [`${PERMISSION_PREFIX}readonly`];
|
|
392
393
|
}
|
|
393
394
|
let oldKeyId = null;
|
|
394
395
|
if (options.revokeOld) {
|