Remove inapplicable constraint
Fix permission check on queries with xtrials