From eb2417ce99ef99b7430d45b6936cf572bac172d4 Mon Sep 17 00:00:00 2001
From: Claire <claire.github-309c@sitedethib.com>
Date: Tue, 4 Jul 2023 18:58:23 +0200
Subject: [PATCH] Fix OAuth apps page crashing when listing apps with certain
 admin API scopes (#25713)

---
 app/lib/scope_parser.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/lib/scope_parser.rb b/app/lib/scope_parser.rb
index d268688c8..45eb3c7b9 100644
--- a/app/lib/scope_parser.rb
+++ b/app/lib/scope_parser.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class ScopeParser < Parslet::Parser
-  rule(:term)      { match('[a-z]').repeat(1).as(:term) }
+  rule(:term)      { match('[a-z_]').repeat(1).as(:term) }
   rule(:colon)     { str(':') }
   rule(:access)    { (str('write') | str('read')).as(:access) }
   rule(:namespace) { str('admin').as(:namespace) }