How can one role able to manage all the resource permissions of all the roles which can be helpful for access management ui

I want to implement a UI where one super role can login and manage access the resource permissions. He can enable/disable crud access for few resources (modules in my case)
How could I read all the permissions of all roles to show them in the UI