🔐 set alias for `listitem roleinheritance break/reset` to `file` and `folder` namespace
currently we have a perfectly working command listitem roleinheritance break and listitem roleinheritance reset which will also allow to break/reset role inheritance on file and folder but still it will be easier for the users to discover those commands when we will have those as well on file and folder namespace like file roleinheritance break etc.
The aim of this issue is to add alias to:
-
listitem roleinheritance breakforfile roleinheritance breakandfolder roleinheritance break -
listitem roleinheritance resetforfile roleinheritance resetandfolder roleinheritance reset
@waldekmastykarz how could I go about it 🤔? do we already have somewhere aliases in the CLI used? Thanks for any tip which will point me in the right direction. @pnp/cli-for-microsoft-365-maintainers any additional comments on how we should approach this?
ok I got an advice on how to do it from @garrytrinder , @plamber , @arjunumenon on a call 👍. I will assign it to myself and do it
ok I got an advice on how to do it from @garrytrinder , @plamber , @arjunumenon on a call 👍. I will assign it to myself and do it
Would you mind sharing it here for future reference and evaluation of the PR?
Would you mind sharing it here for future reference and evaluation of the PR?
yes. Sorry for not being specific about it 😉. So the idea is to use alias similar like we have between user add and o365Group user add commands
https://github.com/pnp/cli-microsoft365/blob/main/src/m365/aad/commands/o365group/o365group-user-add.ts#L30:~:text=public%20alias(,%7D
yes. Sorry for not being specific about it 😉. So the idea is to use alias similar like we have between user add and o365Group user add commands
Understood. For a file or folder, wouldn't you expect to be able to manage permissions through their name, which wouldn't be applicable to a list item? If so, that would require to introduce an option that's relevant only for some aliases, which might end up confusing. Any thoughts on that?
Understood. For a file or folder, wouldn't you expect to be able to manage permissions through their name, which wouldn't be applicable to a list item? If so, that would require to introduce an option that's relevant only for some aliases, which might end up confusing. Any thoughts on that?
TBH no 😅. I wasn't planning on extending the list of options with specific for files and folder. But if you feel like this would not make much sense we may abort this issue and open separate for each command for file and folder. Then in each command we may add the additional options to get for example file by name and use it's ID to pass to execute the already existing command for list item. That way we will still reuse the code as much as we can but also have possiblity to expose options more context specific. @waldekmastykarz let me know what you think? For me both options are ok. I think the second (separate command for each) is of course a bit of work but is better and I may take it as well.
While it's a bit more work, it would be clearer to have separate commands and avoid confusion like "what is a file name for a list item?"
While it's a bit more work, it would be clearer to have separate commands and avoid confusion like "what is a file name for a list item?"
@waldekmastykarz totally. I agree 👍 It will be a lot more convenient for the users this way and this is what is most important 👍. I will close this issue indicate in the https://github.com/pnp/cli-microsoft365/issues/3540 issue that we should also add separate command for those 😉. I will create separate issues for each of those over the weekend as currently I am mainly over the phone trying to be offline to do a bit of recharge 😋. Thanks for you feedback and brainstorm on this one. you rock 🤩