How to let a user to create other users with only specific available roles

to show specific modules,

I have followed the same strategy, I have changed the method from get_all to get_list in the following file

kindly suggest, is this the right way to show specific modules?