lib/pilot/tester_manager.rb in pilot-1.9.2 vs lib/pilot/tester_manager.rb in pilot-1.10.0

- old
+ new

@@ -101,11 +101,19 @@ puts "" list_by_app(ext_testers, "External Testers") end def list_testers_global - int_testers = Spaceship::Tunes::Tester::Internal.all - ext_testers = Spaceship::Tunes::Tester::External.all + begin + int_testers = Spaceship::Tunes::Tester::Internal.all + ext_testers = Spaceship::Tunes::Tester::External.all + rescue => ex + if ex.to_s.include?("Forbidden") + UI.user_error!("You don't have the permission to list the testers of your whole team. Please provide an app identifier to list all testers of a specific application.") + else + raise ex + end + end list_global(int_testers, "Internal Testers") puts "" list_global(ext_testers, "External Testers") end