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

Adding an alias to organization and exposing orgs to templates #30314

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

pedroigor
Copy link
Contributor

@pedroigor pedroigor commented Jun 10, 2024

Closes #30312
Closes #30313

  • Add an alias field to the organization so that we can use its value to reference an organization internally
  • The alias is mandatory in the database but defaults to the name when creating an organization. The only reason for not making it mandatory in the UI is UX so that you can easily create an org without being forced to type the alias. I'm also not adding any format to aliases like stripping spaces, special chars, etc.
  • Changes mappers to use the alias as the claim name rather than the name
  • Expose an organization to different templates: login-username, login, update-profile, idp-review-profile

Copy link
Contributor

@vramik vramik left a comment

Choose a reason for hiding this comment

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

Thanks @pedroigor I went through it briefly and it seems to me it's going into right direction. Couldn't review UI part of the PR.

@pedroigor pedroigor force-pushed the issue-30312 branch 2 times, most recently from be6129c to 479cd41 Compare June 19, 2024 11:25
Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.organization.exportimport.OrganizationExportTest#testExport

Keycloak CI - Base IT (3)

java.lang.AssertionError: expected:<201> but was:<404>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:647)
	at org.junit.Assert.assertEquals(Assert.java:633)
...
jakarta.ws.rs.NotFoundException: HTTP 404 Not Found
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:242)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:136)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
...

Report flaky test

Copy link
Contributor

@ahus1 ahus1 left a comment

Choose a reason for hiding this comment

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

Approving based on @sguilhen's review

@ahus1 ahus1 assigned ahus1 and unassigned ahus1 Jun 19, 2024
@keycloak-github-bot
Copy link

Unreported flaky test detected

If the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR.

org.keycloak.testsuite.organization.exportimport.OrganizationExportTest#testExport

Keycloak CI - Base IT (3)

java.lang.AssertionError: expected:<201> but was:<404>
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:647)
	at org.junit.Assert.assertEquals(Assert.java:633)
...
jakarta.ws.rs.NotFoundException: HTTP 404 Not Found
	at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(ClientInvocation.java:242)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(DefaultEntityExtractorFactory.java:41)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:136)
	at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:103)
...

Report flaky test

Copy link

@keycloak-github-bot keycloak-github-bot bot left a comment

Choose a reason for hiding this comment

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

Unreported flaky test detected, please review

pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 20, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 20, 2024
Copy link
Contributor

@ssilvert ssilvert left a comment

Choose a reason for hiding this comment

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

UI part LGTM

@pedroigor pedroigor merged commit a0ad680 into keycloak:main Jun 20, 2024
71 checks passed
@pedroigor pedroigor deleted the issue-30312 branch June 20, 2024 19:17
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 24, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 25, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 25, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 25, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 25, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 25, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 25, 2024
pedroigor added a commit to pedroigor/keycloak that referenced this pull request Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose organization to theme templates Add an alias to organization
6 participants