Changed database researchDatabse.sql so that all my add, edit, delete and user permissions stuff works. Note edit_user permissions works even when a user does not have any permissions related to that study