Hi Devs! So after struggling for quite sometime, this is what i did. I had one account that could manage to login to the system. I connected to the database and run queries to determine its id. In this case i run the following query
select * from userinfo where username = ‘admin’
from the query, I managed to get the id of the admin user, I repeated again the same query but this time passing the username of the account that could login. From the query results, I managed to get the id of the user. By the way, the id is stored in the userinfoid column.
I thereafter run the query select * from userrole where roleid =‘the role id obtained from the second query. i.e the query with the username of the user who can login as an argument’
I thereafter inserted a new row in the userrolemembers table to assign an admin role to the user who didn’t have full access with the query below
INSERT INTO public.userrolemembers(
userroleid, userid)
VALUES (id of the admin role, id of the user who could login);
after doing so, I logged in using the previously less previllged account, this time it had the admin roles. Form there I had admin roles and I thereafter fixed the user accounts using the user management app of dhis2