[#64667234] When creating a public project, it asks for permission before creating the projects

refactored code so that it asks for public before making a post_api_call to register project