From d05eb5ef4ae243c9006b0a487d8e89b062e70ed4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AD=99=E4=B8=96=E5=86=9B?=
 <30999793+AllForNothing@users.noreply.github.com>
Date: Thu, 10 Mar 2022 10:16:42 +0800
Subject: [PATCH] Add a new robot permission and sort permissions (#16487)

Signed-off-by: AllForNothing <sshijun@vmware.com>
---
 .../system-robot-util.ts                      | 97 ++++++++++---------
 1 file changed, 51 insertions(+), 46 deletions(-)

diff --git a/src/portal/src/app/base/left-side-nav/system-robot-accounts/system-robot-util.ts b/src/portal/src/app/base/left-side-nav/system-robot-accounts/system-robot-util.ts
index 9f4cebcfd..fd830b8ed 100644
--- a/src/portal/src/app/base/left-side-nav/system-robot-accounts/system-robot-util.ts
+++ b/src/portal/src/app/base/left-side-nav/system-robot-accounts/system-robot-util.ts
@@ -49,7 +49,7 @@ export const NAMESPACE_ALL_PROJECTS: string = '*';
 export const INITIAL_ACCESSES: FrontAccess[] = [
     {
         "resource": "repository",
-        "action": "push",
+        "action": "list",
         "checked": true
     },
     {
@@ -57,16 +57,66 @@ export const INITIAL_ACCESSES: FrontAccess[] = [
         "action": "pull",
         "checked": true
     },
+    {
+        "resource": "repository",
+        "action": "push",
+        "checked": true
+    },
     {
         "resource": "repository",
         "action": "delete",
         "checked": true
     },
+    {
+        "resource": "artifact",
+        "action": "read",
+        "checked": true
+    },
+    {
+        "resource": "artifact",
+        "action": "list",
+        "checked": true
+    },
     {
         "resource": "artifact",
         "action": "delete",
         "checked": true
     },
+    {
+        "resource": "artifact-label",
+        "action": "create",
+        "checked": true
+    },
+    {
+        "resource": "artifact-label",
+        "action": "delete",
+        "checked": true
+    },
+    {
+        "resource": "tag",
+        "action": "create",
+        "checked": true
+    },
+    {
+        "resource": "tag",
+        "action": "delete",
+        "checked": true
+    },
+    {
+        "resource": "tag",
+        "action": "list",
+        "checked": true
+    },
+    {
+        "resource": "scan",
+        "action": "create",
+        "checked": true
+    },
+    {
+        "resource": "scan",
+        "action": "stop",
+        "checked": true
+    },
     {
         "resource": "helm-chart",
         "action": "read",
@@ -82,51 +132,6 @@ export const INITIAL_ACCESSES: FrontAccess[] = [
         "action": "delete",
         "checked": true
     },
-    {
-        "resource": "tag",
-        "action": "list",
-        "checked": true
-    },
-    {
-        "resource": "tag",
-        "action": "create",
-        "checked": true
-    },
-    {
-        "resource": "tag",
-        "action": "delete",
-        "checked": true
-    },
-    {
-        "resource": "artifact-label",
-        "action": "create",
-        "checked": true
-    },
-    {
-        "resource": "artifact-label",
-        "action": "delete",
-        "checked": true
-    },
-    {
-        "resource": "scan",
-        "action": "create",
-        "checked": true
-    },
-    {
-        "resource": "scan",
-        "action": "stop",
-        "checked": true
-    },
-    {
-        "resource": "artifact",
-        "action": "list",
-        "checked": true
-    },
-    {
-        "resource": "repository",
-        "action": "list",
-        "checked": true
-    },
     {
         "resource": "helm-chart-version-label",
         "action": "create",