File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
deps/rabbitmq_management/priv/www/js Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ function startWithOAuthLogin () {
108108function render_login_oauth ( messages ) {
109109 let formatData = { }
110110 formatData . warnings = [ ]
111+ formatData . notAuthorized = false
111112 formatData . resource_servers = oauth . resource_servers
112113 formatData . declared_resource_servers_count = oauth . declared_resource_servers_count
113114 formatData . oauth_disable_basic_auth = oauth . oauth_disable_basic_auth
@@ -117,6 +118,7 @@ function render_login_oauth(messages) {
117118 } else if ( typeof messages == "string" ) {
118119 formatData . warnings = [ messages ]
119120 formatData . notAuthorized = messages == "Not authorized"
121+ console . log ( "Single error message" )
120122 }
121123 replace_content ( 'outer' , format ( 'login_oauth' , formatData ) )
122124
Original file line number Diff line number Diff line change 77 < p class = " warning" >< %= warnings[i]% > < / p>
88 < % } % >
99 < % } %>
10- <% if (typeof notAuthorized == ' object ' && notAuthorized) { % >
10+ <% if (notAuthorized) { % >
1111 < button id= " logout" onclick= " oauth_initiateLogout()" > Click here to logout< / button>
1212 < % } %>
1313 </div >
14- <% if ((typeof resource_servers == ' object' && resource_servers .length == 1 ) && oauth_disable_basic_auth) { % >
15- < button id= " login" onclick= " oauth_initiateLogin('<%=resource_servers[0].id%>')" > Click here to log in < / button>
16- < % } else if (typeof resource_servers == ' object' && resource_servers .length >= 1 ) { % >
14+ <% if (! notAuthorized) { % >
15+ < % if ((typeof resource_servers == ' object' && resource_servers .length == 1 ) && oauth_disable_basic_auth) { % >
16+ < button id= " login" onclick= " oauth_initiateLogin('<%=resource_servers[0].id%>')" > Click here to log in < / button>
17+ < % } else if (typeof resource_servers == ' object' && resource_servers .length >= 1 ) { % >
1718
1819 < b> Login with : < / b>
1920 < p/ >
4344 < / div>
4445 <!-- end login with oauth2 -->
4546< % } % >
47+
4648 <!-- begin login with basic auth -->
4749 < % if (! oauth_disable_basic_auth) { % >
4850 < div class = " section-hidden" id= " login-with-basic-auth" >
7072 < / div>
7173 < % } % >
7274 <!-- end login with basic auth -->
75+ < % } %>
7376
7477</div > <!-- login -->
You can’t perform that action at this time.
0 commit comments