I was experimenting with roles and noticed that Superuser only had ROLE_USER.
I removed ROLE_USER and added ROLE_SUPERUSER
Now when I log in, I don't have permission to view anything nor do I have access to the Manage tab.
How is this even possible? Shouldn't superuser always have access? Is this just bad design? How do I fix this? Can I add/remove roles from the db. If so, can you please tell me how?
SOLVED: For other users out there, superuser, and every other user needs ROLE_USER to function.
I didn't have a dbuser password so:
- Dropped into user postgres to find pg_hba.conf (for me it was in /var/lib/pgsql93/data/pg_hba.conf)
- Added this to the first line: local all all trustlocal all all trustlocal all all trustlocal all all trustlocal all all trust (security alert!! this needs to be reverted back right away when you are done - you might want to use whitelisted IPs only in your firewall config when doing this)
- psql -U postgres
- gave postgres a new password (and this caused me problems I'm still working on)
- \connect jasperserver
- UPDATE jiuserrole SET roleid = 5 WHERE userid = 10;
Now superuser is back to ROLE_USER
Now I have to figure out where to add the new password for postgres in the relevant configs because Jasper is now not working due to that changed password.
EDIT: Regarding #4, the original password for postgres is ... drumroll .... "postgres".
Re: #4 and the problems you caused, that is bacause your JasperServer can no longer access the repository, go to /webapps/jasperserver-pro/META-INF/context.xml and change the password for the jdbc/jasperserver JNDI connection properies in that XML file and restart the server :)