added getEventsWithPermission