Unable to access exact web ui to delete SSH Key Pair Button
I'm currently looking to find where the SSH Key Pair Button can be removed from the UI as our customers don't need this. I've dug through the chunk files but there is no clear indication as to where the exact file or where I can delete the UI is.
Thanks!
Thanks for opening your first issue here! Be sure to follow the issue template!
This is the current view but we are unable to find the exact source code as to where we remove these components as the user doesn't need access to this or needs to view this. Thanks!
Hello, @apraba05
This is the source code that controls the display of the SSH key pairs section:
https://github.com/apache/cloudstack/blob/39c5641cbe674b19bc77082b850565f634a7cb84/ui/src/config/section/compute.js#L827-L910
The best approach to hide it from end users is by revoking access to the APIs that manage SSH key pairs, which essentially are: listSSHKeyPairs, createSSHKeyPair and deleteSSHKeyPair. To revoke the APIs access, I'd recommend creating a custom role based on the existing role that is in use by the end user accounts.
I'm actually just looking to remove it completely from the UI. This would then ensure that the user is unable to view it all. It's fine even if the Administrators are unable to view it too. I needed to do it for the Affinity Groups and User Data.
Thanks for your help @bernardodemarco!