Every project in Mendix has a master administrator account, so you will just need to log in with this account to fix your permissions.
In the modeler in the Project Explorer pane, click on Project - > Security, and navigate to the Administrator tab. You can set the master administrator username and password there.