More restrictive admin routes

PolyGerrit uses a catchall route to show a placeholder for unimplemented
admin features. However, some routes for unimplemented features are
sub-routes to features that are implemented. In some cases, the route
for the implemented feature was overly-general, and would match routes
for the unimplemented sub-feature.

With this change, the routes for implemented features are restricted to
avoid matching unimplemented features.

Bug: Issue 7015
Change-Id: I40698e1c8ad2ab613cd07dc48e12f9fca05167aa
diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router.js b/polygerrit-ui/app/elements/core/gr-router/gr-router.js
index 6b418d1..e30c1fd 100644
--- a/polygerrit-ui/app/elements/core/gr-router/gr-router.js
+++ b/polygerrit-ui/app/elements/core/gr-router/gr-router.js
@@ -224,7 +224,7 @@
     });
 
     // Matches /admin/groups/<group>
-    page(/^\/admin\/groups\/(.+)$/, loadUser, data => {
+    page(/^\/admin\/groups\/([^,]+)$/, loadUser, data => {
       restAPI.getLoggedIn().then(loggedIn => {
         if (loggedIn) {
           app.params = {
@@ -336,7 +336,7 @@
     });
 
     // Matches /admin/projects/<project>
-    page(/^\/admin\/projects\/(.+)$/, loadUser, data => {
+    page(/^\/admin\/projects\/([^,]+)$/, loadUser, data => {
       app.params = {
         view: Gerrit.Nav.View.ADMIN,
         project: data.params[0],