Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add realm level setting(s) for Open-specific values #52

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

rhysyngsun
Copy link
Contributor

What are the relevant tickets?

Part of #47

Description (What does it do?)

This adds a UITabProvider which adds an "MIT Open" tab to the realm admin interface as well as exposing the configured data via realm attributes (only 1 for now).

I also did some refactoring of the template provider to organize the properties under beans so they're not all at the top level.

Note: there are several other places that need to use this url too, I'm going to deal with that in a separate PR later. I only did enough here to prove that it works.

Screenshots (if appropriate):

Screenshot 2024-04-11 at 15-55-05 Keycloak Administration UI

How can this be tested?

  • Go to the admin page and enter the home page url for your open instance (e.g. http://open.odl.local:8083/).
  • Go to login via keycloak, the logo should now link to the url.

@rhysyngsun rhysyngsun added the Needs Review An open Pull Request that is ready for review label Apr 11, 2024
@rhysyngsun rhysyngsun changed the title Nl/open link Add realm level setting(s) for Open-specific values Apr 11, 2024
@@ -81,7 +81,7 @@
<header class="pf-v5-c-login__main-header">
<div class="pf-v5-u-mb-2xl">
<h1 class="pf-v5-c-title pf-m-4xl">
<a href="https://mit.edu" class="logo-link pf-v5-u-display-flex pf-v5-u-justify-content-center">
<a href="${open.homeUrl}" class="logo-link pf-v5-u-display-flex pf-v5-u-justify-content-center">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually work? I'm getting an error:

        - Failed at: ${open.homeUrl}  [in template "template.ftl" in macro "registrationLayout" at line 84, column 22]
        - Reached through: @layout.registrationLayout displayMes...  [in template "error.ftl" at line 2, column 1]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worked for me, that error would make me think the latest code wasn't loaded in, but you wouldn't be seeing any of the rest of it either if that was the case. That particular property isn't conditional like loginAttempt is...

@collinpreston collinpreston removed the Needs Review An open Pull Request that is ready for review label Apr 12, 2024
@rhysyngsun rhysyngsun added the Needs Review An open Pull Request that is ready for review label Apr 12, 2024
@rhysyngsun
Copy link
Contributor Author

@collinpreston should be all set, although I'm not sure why you'd be hitting this error: #52 (comment)

@rhysyngsun
Copy link
Contributor Author

Note you'll need to re-enter the setting, since the key changed.

@collinpreston collinpreston removed the Needs Review An open Pull Request that is ready for review label Apr 12, 2024
@rhysyngsun rhysyngsun merged commit dd33149 into main Apr 12, 2024
5 checks passed
@rhysyngsun rhysyngsun deleted the nl/open-link branch April 12, 2024 20:02
rhysyngsun added a commit that referenced this pull request Apr 16, 2024
This reverts commit dd33149, reversing
changes made to a5f149d.
rhysyngsun added a commit that referenced this pull request Apr 16, 2024
Revert "Merge pull request #52 from mitodl/nl/open-link"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants