Skip to content

Commit

Permalink
Remove login buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-WWU-IT committed Dec 9, 2022
1 parent aef8c93 commit fc53cfe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runit/reverse-proxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ def _modifyLoginPage(soup):
# Inject the reverse proxy client-side script
_injectScript(soup, '/js/reverse-proxy-login.js')

# Hide the login page
# Hide the login page elements
cardElement = soup.find('div', class_='card')
if cardElement:
_appendStyle(cardElement, 'display: none;')
parent = cardElement.find_parent()

# Add a new info panel
h1Element = soup.new_tag('h1', style='text-align: center;')
h1Element.string = 'Automatic re-login'
textElement = soup.new_tag('p', style='text-align: center;')
Expand All @@ -105,6 +106,10 @@ def _modifyLoginPage(soup):
cardElement = soup.new_tag('div', class_='card')
cardElement.append(headerElement)
parent.append(cardElement)

ulElement = soup.find('ul', class_='navbar-right')
if ulElement:
_appendStyle(ulElement, 'display: none;')


def _modifyGenericPage(soup):
Expand Down

0 comments on commit fc53cfe

Please sign in to comment.