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 codeready user readonly theme #540

Merged
merged 3 commits into from
Nov 19, 2020
Merged

Add codeready user readonly theme #540

merged 3 commits into from
Nov 19, 2020

Conversation

tolusha
Copy link
Contributor

@tolusha tolusha commented Nov 18, 2020

Signed-off-by: Anatolii Bazko abazko@redhat.com

Reference issue

https://issues.redhat.com/browse/CRW-1379

Screenshot from 2020-11-18 18-17-03

Screenshot from 2020-11-18 18-18-16

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: AndrienkoAleksandr, tolusha
To complete the pull request process, please assign after the PR has been reviewed.
You can assign the PR to them by writing /assign in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@@ -489,13 +490,18 @@ func getSpecKeycloakDeployment(
" && /opt/jboss/docker-entrypoint.sh -b 0.0.0.0 -c standalone.xml"
command += " -Dkeycloak.profile.feature.token_exchange=enabled -Dkeycloak.profile.feature.admin_fine_grained_authz=enabled"
if cheFlavor == "codeready" {
addUsernameReadonlyTheme := "if [ ! -d /opt/eap/themes/codeready-username-readonly ]; then" +
Copy link
Contributor

Choose a reason for hiding this comment

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

I love that this project allows 'if product then...' branches -- makes the sync/fork/massaging easier downstream :)

"context"
"regexp"
"strconv"
"strings"

"github.com/eclipse/che-operator/pkg/deploy/server"

Copy link
Contributor

Choose a reason for hiding this comment

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

strange spacing and sort order, but I'm not fussed so +1. :D

@nickboldt
Copy link
Contributor

LGTM but not an expert in the code. +1

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
@openshift-ci-robot
Copy link

New changes are detected. LGTM label has been removed.

Comment on lines +493 to +500
addUsernameReadonlyTheme := "baseTemplate=/opt/eap/themes/base/login/login-update-profile.ftl" +
" && readOnlyTemplateDir=/opt/eap/themes/codeready-username-readonly/login" +
" && readOnlyTemplate=${readOnlyTemplateDir}/login-update-profile.ftl" +
" && if [ ! -d ${readOnlyTemplateDir} ]; then" +
" mkdir -p ${readOnlyTemplateDir}" +
" && cp ${baseTemplate} ${readOnlyTemplate}" +
" && echo \"parent=rh-sso\" > ${readOnlyTemplateDir}/theme.properties" +
" && sed -i 's|id=\"username\" name=\"username\"|id=\"username\" readonly name=\"username\"|g' ${readOnlyTemplate}; fi"
Copy link
Member

Choose a reason for hiding this comment

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

@tolusha could you please calrify when / on which stage this command is executed?
I'm wondering if it is possible to do such a manipulation manually for CRW 2.5

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The command is run inside keycloak pod before keycloak starts up.
I don't see a way how we can do it manually.

@tolusha tolusha merged commit 7ccd18d into master Nov 19, 2020
@tolusha tolusha deleted the addreaonlytheme branch November 19, 2020 15:49
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.

5 participants