-
Notifications
You must be signed in to change notification settings - Fork 372
Description
Currently, we have quite a few remove commands that destructively remove stuff from the M365 environment. Take, for example, the command spo file remove. By just providing the required parameters, this command will remove the file permanently, without the ability to restore it. This is bad; we want the user to explicitly consent to the permanent removal of an item. This prevents stuff from being removed permanently by accident.
The idea is to check all destructive commands (most of them end with remove). Let's check if this command has the ability to both recycle and permanently delete an item. If this is the case, make sure that we recycle the item by default and add a flag --permanent to permanently delete it.
Example: for the command spo file remove, we should remove the option --recycle and add the option --permanent.
TODO
- Check if every destructive command recycles an item by default
- Replace
--recycleby--permanent
- Replace
- Some destructive commands use the option
--skipRecycleBin, let's rename these to--permanentfor convenience