CRM-13179 fix profile api to respect profile permissions, remove debug