From b26c683c162b380f10400d31645fd7ee19e15c6f Mon Sep 17 00:00:00 2001 From: Smita Nachan Date: Mon, 22 Jul 2024 05:50:19 +0000 Subject: [PATCH] Fixes Rights property from 'spo applicationcustomizer get' command. Closes #6052 --- .../applicationcustomizer-get.mdx | 11 ++++++----- docs/docs/v9-upgrade-guidance.mdx | 12 ++++++++++-- .../applicationcustomizer-get.spec.ts | 8 ++++---- .../applicationcustomizer-get.ts | 1 - 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx b/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx index dae63385ce2..8dbaa253dd8 100644 --- a/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx +++ b/docs/docs/cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx @@ -93,7 +93,10 @@ m365 spo applicationcustomizer get --id 14125658-a9bc-4ddf-9c75-1b5767c9a337 --w "Name": "{4a428b32-08cf-45c7-9986-17585af38806}", "RegistrationId": null, "RegistrationType": 0, - "Rights": "{\"High\":\"0\",\"Low\":\"0\"}", + "Rights": { + "High": 0, + "Low": 0 + }, "Scope": "Web", "ScriptBlock": null, "ScriptSrc": null, @@ -120,7 +123,6 @@ m365 spo applicationcustomizer get --id 14125658-a9bc-4ddf-9c75-1b5767c9a337 --w Name : {4a428b32-08cf-45c7-9986-17585af38806} RegistrationId : null RegistrationType : 0 - Rights : {"High":"0","Low":"0"} Scope : Web ScriptBlock : null ScriptSrc : null @@ -134,8 +136,8 @@ m365 spo applicationcustomizer get --id 14125658-a9bc-4ddf-9c75-1b5767c9a337 --w ```csv - ClientSideComponentId,ClientSideComponentProperties,CommandUIExtension,Description,Group,HostProperties,Id,ImageUrl,Location,Name,RegistrationId,RegistrationType,Rights,Scope,ScriptBlock,ScriptSrc,Sequence,Title,Url,VersionOfUserCustomAction - 9a8b100c-246b-4592-9454-67826523e159,"{""testMessage"":""Test message""}",,,,,4a428b32-08cf-45c7-9986-17585af38806,,ClientSideExtension.ApplicationCustomizer,{4a428b32-08cf-45c7-9986-17585af38806},,0,"{""High"":""0"",""Low"":""0""}",Web,,,65536,HelloWorld,,1.0.1.0 + ClientSideComponentId,ClientSideComponentProperties,CommandUIExtension,Description,Group,Id,ImageUrl,Location,Name,RegistrationId,RegistrationType,Scope,ScriptBlock,ScriptSrc,Sequence,Title,Url,VersionOfUserCustomAction + 9a8b100c-246b-4592-9454-67826523e159,"{""testMessage"":""Test message""}",,,,4a428b32-08cf-45c7-9986-17585af38806,,ClientSideExtension.ApplicationCustomizer,Some customizer,,0,Web,,,0,Some customizer,,16.0.1.0 ``` @@ -157,7 +159,6 @@ m365 spo applicationcustomizer get --id 14125658-a9bc-4ddf-9c75-1b5767c9a337 --w Location | ClientSideExtension.ApplicationCustomizer Name | {4a428b32-08cf-45c7-9986-17585af38806} RegistrationType | 0 - Rights | {"High":"0","Low":"0"} Scope | Web Sequence | 65536 Title | HelloWorld diff --git a/docs/docs/v9-upgrade-guidance.mdx b/docs/docs/v9-upgrade-guidance.mdx index c806c87e0fc..2b5ec9a8e93 100644 --- a/docs/docs/v9-upgrade-guidance.mdx +++ b/docs/docs/v9-upgrade-guidance.mdx @@ -149,7 +149,7 @@ In the past versions of CLI for Microsoft 365, the command had no output. When u When using the [spo file copy](./cmd/spo/file/file-copy.mdx) command, please use the new command input. This means that you'll have to remove option `--resetAuthorAndCreated` from your scripts and automation tools. -### Removed 'spo folder rename' alias +### Removed `spo folder rename` alias The `spo folder rename` command was removed and replaced by the [spo folder set](./cmd/spo/folder/folder-set.mdx) command. @@ -157,6 +157,14 @@ The `spo folder rename` command was removed and replaced by the [spo folder set] Please, update your scripts to use the `spo folder set` command instead of `spo folder rename`. +### Updated output of `spo applicationcustomizer get` command + +In the previous version of CLI, the command output had a `Rights` property that was a stringified JSON object. In this release, this has been changed to a JSON object. + +#### What action do I need to take? + +Please, check the documentation of the [spo applicationcustomizer get](./cmd/spo/applicationcustomizer/applicationcustomizer-get.mdx) command to see the updated output and adjust your scripts accordingly. + ## SharePoint Framework ### Removed overwrite option from `spfx project github workflow add` command @@ -165,4 +173,4 @@ Overwriting the SPFx package should be the default behavior of the continuous de #### What action do I need to take? -Please update your scripts not to use the `overwrite` option. \ No newline at end of file +Please update your scripts not to use the `overwrite` option. diff --git a/src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.spec.ts b/src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.spec.ts index 2e7d837536f..532f0f16b1b 100644 --- a/src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.spec.ts +++ b/src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.spec.ts @@ -31,7 +31,7 @@ describe(commands.APPLICATIONCUSTOMIZER_GET, () => { "Name": title, "RegistrationId": null, "RegistrationType": 0, - "Rights": "{\"High\":0,\"Low\":0}", + "Rights": { "High": 0, "Low": 0 }, "Scope": 3, "ScriptBlock": null, "ScriptSrc": null, @@ -59,7 +59,7 @@ describe(commands.APPLICATIONCUSTOMIZER_GET, () => { Name: 'Some customizer', RegistrationId: null, RegistrationType: 0, - Rights: '"{\\"High\\":0,\\"Low\\":0}"', + Rights: { "High": 0, "Low": 0 }, Scope: 'Web', ScriptBlock: null, ScriptSrc: null, @@ -642,7 +642,7 @@ describe(commands.APPLICATIONCUSTOMIZER_GET, () => { Name: 'Some customizer', RegistrationId: null, RegistrationType: 0, - Rights: '{"High":0,"Low":0}', + Rights: { "High": 0, "Low": 0 }, Scope: 'Web', ScriptBlock: null, ScriptSrc: null, @@ -678,7 +678,7 @@ describe(commands.APPLICATIONCUSTOMIZER_GET, () => { "Name": title, "RegistrationId": null, "RegistrationType": 0, - "Rights": "{\"High\":0,\"Low\":0}", + "Rights": { "High": 0, "Low": 0 }, "Scope": "3", "ScriptBlock": null, "ScriptSrc": null, diff --git a/src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.ts b/src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.ts index 911cc22e47c..c5824d12e29 100644 --- a/src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.ts +++ b/src/m365/spo/commands/applicationcustomizer/applicationcustomizer-get.ts @@ -114,7 +114,6 @@ class SpoApplicationCustomizerGetCommand extends SpoCommand { if (!args.options.clientSideComponentProperties) { await logger.log({ ...customAction, - Rights: JSON.stringify(customAction.Rights), Scope: this.humanizeScope(customAction.Scope) }); }