add permission manager code for create appInstance