Adds permission command to get a list of permissions applied on a Resource
Hi, Thanks for the PR.
The Command you implemented is is using the name permission and lists Resource Permissions But Folders also have Permissions and we might want to add a Command for that in the Future too. Any Ideas on how to Resolve this conflict? Maybe the command could be list resource permission instead of just list permission which would also allow for list folder permission.
I did not known that folders could also have permissions, but this pull request could easily be extended to support folders, by adding a --folder flag to the permission subcommand matching the --resource flag.
But your question made me rethink this. This is a list of options that could also be implemented:
Option 1 (expands from this PR):
./go-passbolt-cli list permission --resource cf984ed8-28bc-4722-aa7b-07a8e3d6ad3c
./go-passbolt-cli list permission --folder f6d16be2-3313-4a48-b1ba-6fe03ce7e78e
Option 2 (suggestion):
./go-passbolt-cli list resource permission --id cf984ed8-28bc-4722-aa7b-07a8e3d6ad3c
./go-passbolt-cli list folder permission --id f6d16be2-3313-4a48-b1ba-6fe03ce7e78e
Option 3:
./go-passbolt-cli list permission resource --id cf984ed8-28bc-4722-aa7b-07a8e3d6ad3c
./go-passbolt-cli list permission folder --id f6d16be2-3313-4a48-b1ba-6fe03ce7e78e
Option 4:
./go-passbolt-cli permission resource --id cf984ed8-28bc-4722-aa7b-07a8e3d6ad3c
./go-passbolt-cli permission folder --id f6d16be2-3313-4a48-b1ba-6fe03ce7e78e
Option 5:
./go-passbolt-cli permission --resource cf984ed8-28bc-4722-aa7b-07a8e3d6ad3c
./go-passbolt-cli permission --folder f6d16be2-3313-4a48-b1ba-6fe03ce7e78e
Option 6:
./go-passbolt-cli get resource permission --id cf984ed8-28bc-4722-aa7b-07a8e3d6ad3c
./go-passbolt-cli get folder permission --id f6d16be2-3313-4a48-b1ba-6fe03ce7e78e
Since I imagine the main use case is to list permissions for a specific resource/folder and not a list of resources/folders, I think this should be option 6, associated with the get command and not the list command. I have created a new PR #63 with this option.
Superseded by #63, Thanks.