Adds spo group add command. Closes #3484#3493
Adds spo group add command. Closes #3484#3493milanholemans wants to merge 4 commits intopnp:mainfrom
spo group add command. Closes #3484#3493Conversation
|
Fast as always, 👍 we'll review as soon as we can. Though due to some vacations here, that might take a little while 😬 |
All good, I'm not in a hurry. Also vacations are more important 🙂 |
Adam-it
left a comment
There was a problem hiding this comment.
works ✅
test pass ✅
code ok ✅
you rock 🤩🤩
Adam-it
left a comment
There was a problem hiding this comment.
Almost there.
Let's refactor to Promise.then() approach
|
Great, thanks for the quick turn around. Will review/merge it today night 👍. |
Adam-it
left a comment
There was a problem hiding this comment.
I pulled and started testing it locally and I noticed just one strange behavior for the --onlyAllowMembersViewMembership. This is the only option when not specified is true by default. I understand this is the OOO behavior but I was wondering wouldn't it make more sense and be more aligned with what we have in the spec that when we don't define it it will be false. Now it seems this is the only one that we need to explicitly set to false.
❯ m365 spo group add --webUrl https://tenanttocheck.sharepoint.com/sites/hr-life --name "test3"
{
"Id": 20,
"IsHiddenInUI": false,
"LoginName": "test3",
"Title": "test3",
"PrincipalType": 8,
"AllowMembersEditMembership": false,
"AllowRequestToJoinLeave": false,
"AutoAcceptRequestToJoinLeave": false,
"Description": null,
"OnlyAllowMembersViewMembership": true,
"OwnerTitle": "Adam Wójcik",
"RequestToJoinLeaveEmailSetting": null
}
❯ m365 spo group add --webUrl https://tenanttocheck.sharepoint.com/sites/hr-life --name "test4" --onlyAllowMembersViewMembership false
{
"Id": 21,
"IsHiddenInUI": false,
"LoginName": "test4",
"Title": "test4",
"PrincipalType": 8,
"AllowMembersEditMembership": false,
"AllowRequestToJoinLeave": false,
"AutoAcceptRequestToJoinLeave": false,
"Description": null,
"OnlyAllowMembersViewMembership": false,
"OwnerTitle": "Adam Wójcik",
"RequestToJoinLeaveEmailSetting": null
}
Let me know what do you think? For me seems a bit unexpected behavior when compered to other options 🤔
Sorry for the late comment I know you were expecting this to be already ready to merge but I would like it to be perfect 👍. Lets discuss this one last thing and we are ready to go 😉
You are doing a awesome job 🤩
Strange, I hadn't noticed this one yet. I will check this one tomorrow, command has to be perfect indeed. 😃 |
let me know if you need any help. I will be awaiting your feedback on that but there is no rush 👍👍. You rock 🤩 |
In my opinion, this might be a bit tricky. When we create a group via the UI, |
Yes we may do that and which will align it with the group set command. |
If I'm not mistaken, if we leave it as is, you are unable to set it to |
It is possible. Using flag option with false value works. please double check to code snippet I posted earlier |
Aw yeah I missed that 2nd example. In that case there are 2 options indeed. Leave it as is, or refactor it to |
|
Good catch @Adam-it! Using a flag for I'm a little doubtful at what to do with the other options. On the one hand it would seem logical to just change this one only, as it's then clear something specific is going on with it. But on the other hand that also seems rather inconsistent in this case. As all these options look alike and kind of belong together. I think I'd prefer moving them all to boolean options. What about you? |
This one gets my vote |
+1 here as well 😉 |
|
In that case: let's follow that route! |
|
FWIW, if we expect people to specify a value, let's make it clear in the docs and option's spec. If we specify an option as a flag, it should be used as such. I think there's a pattern for negating flags, like |
Adam-it
left a comment
There was a problem hiding this comment.
👌perfect 🙂
@milanholemans you rock 🤩
|
merged manually |
Adds
spo group addcommand. Closes #3484