Added permission check to clearProjects()