How to hide create workspace and Edit button based on user roles

you have to write custom code for this