Crete new Roles

Hi there, Im Jonathan from Colombia, actually I implemented a ODK central server and send submissions from ODK collect.

I need modify the code and add new role, any can help in show me or guide me where I can do it, I search in the code of ODK central.

Basically I need copy the Project Viewer and make modifications on permission of that user, for example I need that the new role only can download specific submissions, for example submission where the country is USA

Thanks in advance