refactor checkAcl