optimize condition getaccessibleprojects