6969 <head>
7070 <meta charset="UTF-8">
7171 <title>403 - Access Forbidden</title>
72- <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
73- <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
74- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
72+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
73+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
7574 <style>
7675 .oops {
7776 font-size: 9em;
@@ -80,23 +79,39 @@ data:
8079 .message {
8180 font-size: 3em;
8281 }
82+ .error-template {
83+ display: none;
84+ }
8385 </style>
8486 </head>
8587 <body>
8688 <div class="container text-center">
8789 <div class="row vcenter" style="margin-top: 20%;">
8890 <div class="col-md-12">
89- <div class="error-template">
91+ <div class="error-template" id="error-template" >
9092 <h1 class="oops">Oops!</h1>
9193 <h2 class="message">403 Permission Denied</h2>
9294 <div class="error-details">
9395 Sorry, you do not have access to this page, please contact your administrator.
94- If you are authorized to see this page, please try <a href="/">reload</a> or <a href="/oauth/logout?redirect=/">login again</a>.
96+ If you are authorized to see this page, please try <a href="/">reload</a>
97+ or <a href="/oauth/logout?redirect=/">login again</a>.
9598 </div>
9699 </div>
97100 </div>
98101 </div>
99- </div>
102+ </div>
103+ <script>
104+ var retryKey = 'gk_403_retry';
105+ var retryCount = parseInt(sessionStorage.getItem(retryKey) || '0', 10);
106+
107+ if (retryCount < 1) {
108+ sessionStorage.setItem(retryKey, String(retryCount + 1));
109+ window.location.replace('/');
110+ } else {
111+ sessionStorage.removeItem(retryKey);
112+ document.getElementById('error-template').style.display = 'block';
113+ }
114+ </script>
100115 </body>
101116 </html>
102117 ---
0 commit comments