Commit 9d68da7c authored by Hugo's avatar Hugo
Browse files

Merge branch 'v15' into 'master'

V15

See merge request !9
parents 8a887ddb 3e9fa64e
Pipeline #760 passed with stages
in 1 minute and 9 seconds
......@@ -30,7 +30,18 @@ docker-build:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile.build --destination $DOCKER_IMAGE:$CI_COMMIT_SHORT_SHA
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --destination $DOCKER_IMAGE:$CI_COMMIT_SHORT_SHA --destination $DOCKER_IMAGE:latest
only:
- master
- master
docker-build-dev:
stage: docker-build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- cp $DOCKER_SECRET_CONFIG /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --destination $DOCKER_IMAGE:$CI_COMMIT_REF_SLUG
except:
- master
FROM docker.io/jboss/keycloak:11.0.3
FROM docker.io/jboss/keycloak:15.0.2 as base
RUN sed -i 's/ng-pattern=\".*\"/pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/user-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/group-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/create-group.html
RUN sed -i 's/ng-pattern=\".*\"/pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{2,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/user-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{2,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/group-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{2,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/create-group.html
FROM base as prod
COPY ./liiibre.jar /opt/jboss/keycloak/standalone/deployments/liiibre.jar
FROM docker.io/jboss/keycloak:11.0.3
RUN sed -i 's/ng-pattern=\".*\"/pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/user-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/group-detail.html \
&& sed -i 's/name=\"name\"/name=\"name\" pattern=\"[a-zA-Z][a-zA-Z0-9-_.@]{5,24}\"/' /opt/jboss/keycloak/themes/base/admin/resources/partials/create-group.html
COPY ./liiibre.jar /opt/jboss/keycloak/standalone/deployments/liiibre.jar
version: "3"
services:
mailhog:
image: mailhog/mailhog
ports:
- 8025:8025
version: "3"
services:
keycloak:
image: libresh/keycloak:latest
build:
target: prod
volumes:
- ./disable-theme-cache.cli:/opt/jboss/startup-scripts/disable-theme-cache.cli
version: '3'
version: "3"
services:
postgres:
image: postgres
volumes:
- db:/var/lib/postgresql/data
- db:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
build: ./
image: libresh/keycloak:dev
build:
context: ./
target: base
volumes:
- ./src/cfamederic:/opt/jboss/keycloak/themes/cfamederic
- ./src/liiibre:/opt/jboss/keycloak/themes/liiibre
- ./src/liiibrelite:/opt/jboss/keycloak/themes/liiibrelite
- ./src/liiibrelitenohosterlogo:/opt/jboss/keycloak/themes/liiibrelitenohosterlogo
- ./src/smart:/opt/jboss/keycloak/themes/smart
- ./src/zwo:/opt/jboss/keycloak/themes/zwo
- ./disable-theme-cache.cli:/opt/jboss/startup-scripts/disable-theme-cache.cli
......@@ -30,7 +34,7 @@ services:
ports:
- 8080:8080
depends_on:
- postgres
- postgres
volumes:
db:
version: '3'
services:
postgres:
image: postgres
volumes:
- db:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
keycloak:
image: keycloak
volumes:
- ./disable-theme-cache.cli:/opt/jboss/startup-scripts/disable-theme-cache.cli
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: indiehosters
ports:
- 8080:8080
depends_on:
- postgres
volumes:
db:
body.in-iframe .navbar {
display: none;
}
body.in-iframe .sidebar-pf-left {
min-height: 100vh !important;
}
if (window.self !== window.top) {
document.addEventListener("DOMContentLoaded", function () {
document.body.classList.add("in-iframe");
});
}
module.controller(
"LiiibreGroupUserCtl",
function LiiibreGroupUserCtl(
......
parent=keycloak
locales=en
locales=en,fr
styles=node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css node_modules/select2/select2.css lib/angular/treeview/css/angular.treeview.css node_modules/text-security/text-security.css css/styles.css css/liiibre.css
scripts=js/script.js
......@@ -3,7 +3,7 @@ doRegisterNow=Confirm
loginTitle=Log in to {0}
usernamePlaceholder=CamilleLila
usernameHelper=This is how other members will be able to identify you. Attention this choice is definitive, it is recommended to opt for a username under the form ''firstnamelastname''. Special characters are not allowed.
usernameValidationHelper=Username can only contain letters, numbers, dots, hyphens and be between 3 and 25 characters long. Thank you
usernameValidationHelper=Username can only contain letters, numbers, dots, hyphens and be between 2 and 24 characters long. Thank you
firstNamePlaceholder=Camille
lastNamePlaceholder=Lila
emailPlaceholder=c.lila@mail.com
......
......@@ -7,7 +7,7 @@ username=Pseudo
usernameOrEmail=Pseudo ou courriel
usernamePlaceholder=CamilleLila
usernameHelper=C''est ainsi que les autres membres pourront vous identifier. Attention ce choix est d\u00e9finitif, il est recommand\u00e9 d''opter pour un pseudo sous la forme ''prenomnom''. <b>Les caract\u00e9res sp\u00e9ciaux et accents ne sont pas autoris\u00e9s</b>.
usernameValidationHelper=Les pseudos ne peuvent contenir que des lettres, des nombres, points, tirets et faire entre 3 et 25 caract\u00e8res. Merci
usernameValidationHelper=Les pseudos ne peuvent contenir que des lettres, des nombres, points, tirets et faire entre 2 et 24 caract\u00e8res. Merci
firstNamePlaceholder=Camille
lastNamePlaceholder=Lila
emailPlaceholder=c.lila@mail.com
......
......@@ -4,6 +4,7 @@
--third-color: #5db9d3;
--hover-color: #0f4c81;
--grey: #72767b;
}
a {
......@@ -21,14 +22,6 @@ body {
font-size: 15px;
}
.alert {
border-radius: 3px;
}
.alert-error {
border: solid 1px #c00;
}
.login-pf {
background-position: center center, left top;
background-size: 85%, 80%;
......
<#macro registrationLayout bodyClass="" displayInfo=false displayMessage=true displayRequiredFields=false displayWide=false showAnotherWayIfPresent=true>
<#macro registrationLayout bodyClass="" displayInfo=false displayMessage=true displayRequiredFields=false showAnotherWayIfPresent=true>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" class="${properties.kcHtmlClass!}">
......@@ -14,6 +14,11 @@
</#if>
<title>${msg("loginTitle",(realm.displayName!''))}</title>
<link rel="icon" href="${url.resourcesPath}/img/favicon.ico" />
<#if properties.stylesCommon?has_content>
<#list properties.stylesCommon?split(' ') as style>
<link href="${url.resourcesCommonPath}/${style}" rel="stylesheet" />
</#list>
</#if>
<#if properties.styles?has_content>
<#list properties.styles?split(' ') as style>
<link href="${url.resourcesPath}/${style}" rel="stylesheet" />
......@@ -32,7 +37,7 @@
</head>
<body class="${properties.kcBodyClass!}">
<div class="${properties.kcLoginClass!}">
<div class="${properties.kcLoginClass!}">
<div id="kc-header" class="${properties.kcHeaderClass!}">
<div id="kc-header-wrapper" class="${properties.kcHeaderWrapperClass!}">
<a href="${url.loginUrl}">
......@@ -41,22 +46,24 @@
</a>
</div>
</div>
<div class="${properties.kcFormCardClass!} <#if displayWide>${properties.kcFormCardAccountClass!}</#if>">
<header class="${properties.kcFormHeaderClass!}">
<#if realm.internationalizationEnabled && locale.supported?size gt 1>
<div id="kc-locale">
<div id="kc-locale-wrapper" class="${properties.kcLocaleWrapperClass!}">
<div class="kc-dropdown" id="kc-locale-dropdown">
<a href="#" id="kc-current-locale-link">${locale.current}</a>
<ul>
<#list locale.supported as l>
<li class="kc-dropdown-item"><a href="${l.url}">${l.label}</a></li>
</#list>
</ul>
<div class="${properties.kcFormCardClass!}">
<header class="${properties.kcFormHeaderClass!}">
<#if realm.internationalizationEnabled && locale.supported?size gt 1>
<div class="${properties.kcLocaleMainClass!}" id="kc-locale">
<div id="kc-locale-wrapper" class="${properties.kcLocaleWrapperClass!}">
<div id="kc-locale-dropdown" class="${properties.kcLocaleDropDownClass!}">
<a href="#" id="kc-current-locale-link">${locale.current}</a>
<ul class="${properties.kcLocaleListClass!}">
<#list locale.supported as l>
<li class="${properties.kcLocaleListItemClass!}">
<a class="${properties.kcLocaleItemClass!}" href="${l.url}">${l.label}</a>
</li>
</#list>
</ul>
</div>
</div>
</div>
</div>
</#if>
</#if>
<#if !(auth?has_content && auth.showUsername() && !auth.showResetCredentials())>
<#if displayRequiredFields>
<div class="${properties.kcContentWrapperClass!}">
......@@ -78,31 +85,27 @@
</div>
<div class="col-md-10">
<#nested "show-username">
<div class="${properties.kcFormGroupClass!}">
<div id="kc-username">
<label id="kc-attempted-username">${auth.attemptedUsername}</label>
<a id="reset-login" href="${url.loginRestartFlowUrl}">
<div class="kc-login-tooltip">
<i class="${properties.kcResetFlowIcon!}"></i>
<span class="kc-tooltip-text">${msg("restartLoginTooltip")}</span>
</div>
</a>
</div>
<div id="kc-username" class="${properties.kcFormGroupClass!}">
<label id="kc-attempted-username">${auth.attemptedUsername}</label>
<a id="reset-login" href="${url.loginRestartFlowUrl}">
<div class="kc-login-tooltip">
<i class="${properties.kcResetFlowIcon!}"></i>
<span class="kc-tooltip-text">${msg("restartLoginTooltip")}</span>
</div>
</a>
</div>
</div>
</div>
<#else>
<#nested "show-username">
<div class="${properties.kcFormGroupClass!}">
<div id="kc-username">
<label id="kc-attempted-username">${auth.attemptedUsername}</label>
<a id="reset-login" href="${url.loginRestartFlowUrl}">
<div class="kc-login-tooltip">
<i class="${properties.kcResetFlowIcon!}"></i>
<span class="kc-tooltip-text">${msg("restartLoginTooltip")}</span>
</div>
</a>
</div>
<div id="kc-username" class="${properties.kcFormGroupClass!}">
<label id="kc-attempted-username">${auth.attemptedUsername}</label>
<a id="reset-login" href="${url.loginRestartFlowUrl}">
<div class="kc-login-tooltip">
<i class="${properties.kcResetFlowIcon!}"></i>
<span class="kc-tooltip-text">${msg("restartLoginTooltip")}</span>
</div>
</a>
</div>
</#if>
</#if>
......@@ -113,27 +116,28 @@
<#-- App-initiated actions should not see warning messages about the need to complete the action -->
<#-- during login. -->
<#if displayMessage && message?has_content && (message.type != 'warning' || !isAppInitiatedAction??)>
<div class="alert alert-${message.type}">
<#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon!}"></span></#if>
<#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon!}"></span></#if>
<#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon!}"></span></#if>
<#if message.type = 'info'><span class="${properties.kcFeedbackInfoIcon!}"></span></#if>
<span class="kc-feedback-text">${kcSanitize(message.summary)?no_esc}</span>
<div class="alert-${message.type} ${properties.kcAlertClass!} pf-m-<#if message.type = 'error'>danger<#else>${message.type}</#if>">
<div class="pf-c-alert__icon">
<#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon!}"></span></#if>
<#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon!}"></span></#if>
<#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon!}"></span></#if>
<#if message.type = 'info'><span class="${properties.kcFeedbackInfoIcon!}"></span></#if>
</div>
<span class="${properties.kcAlertTitleClass!}">${kcSanitize(message.summary)?no_esc}</span>
</div>
</#if>
<#nested "form">
<#if auth?has_content && auth.showTryAnotherWayLink() && showAnotherWayIfPresent>
<form id="kc-select-try-another-way-form" action="${url.loginAction}" method="post" <#if displayWide>class="${properties.kcContentWrapperClass!}"</#if>>
<div <#if displayWide>class="${properties.kcFormSocialAccountContentClass!} ${properties.kcFormSocialAccountClass!}"</#if>>
<div class="${properties.kcFormGroupClass!}">
<input type="hidden" name="tryAnotherWay" value="on" />
<a href="#" id="try-another-way" onclick="document.forms['kc-select-try-another-way-form'].submit();return false;">${msg("doTryAnotherWay")}</a>
</div>
</div>
</form>
</#if>
<#if auth?has_content && auth.showTryAnotherWayLink() && showAnotherWayIfPresent>
<form id="kc-select-try-another-way-form" action="${url.loginAction}" method="post">
<div class="${properties.kcFormGroupClass!}">
<input type="hidden" name="tryAnotherWay" value="on"/>
<a href="#" id="try-another-way"
onclick="document.forms['kc-select-try-another-way-form'].submit();return false;">${msg("doTryAnotherWay")}</a>
</div>
</form>
</#if>
<#if displayInfo>
<div id="kc-info" class="${properties.kcSignUpClass!}">
......@@ -149,6 +153,9 @@
</#if>
</div>
</div>
<div id="footerHoster" style="${properties.footerHosterStyle!}">
<a href="${properties.hosterLink!}" target="_blank"><img src="${url.resourcesPath}/img/${properties.hosterLogoImg!}"></a>
</div>
</body>
</html>
</#macro>
parent=keycloak
### hoster logo in footer
footerHosterStyle=width: 8rem;margin: 2rem auto;
hosterLink=https://indiehosters.net
hosterLogoImg=indiehostersLogo.png
kcHtmlClass=login-pf
kcLoginClass=login-pf-page
......
......@@ -4,6 +4,8 @@
--third-color: #0ed7ee;
--hover-color: #0ba9ba;
--grey: #72767b;
--pf-global--FontFamily--sans-serif: FengardoneueRegular, overpass, overpass, open sans, -apple-system, blinkmacsystemfont, Segoe UI, roboto, Helvetica Neue, arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
--pf-global--FontFamily--heading--sans-serif: FengardoneueBlack, overpass, overpass, open sans, -apple-system, blinkmacsystemfont, Segoe UI, roboto, Helvetica Neue, arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
}
@font-face {
......@@ -58,22 +60,29 @@ body {
@media only screen and (min-width : 840px) and (max-width: 1100px) {
.login-pf {
background-position-x: 5%,95%,center;
background-position-y: 20rem,20rem,center;
background-position-y: 15rem,15rem,center;
background-size: 30%,30%,100%;}
}
@media only screen and (min-width : 1100px) and (max-width: 1600px) {
.login-pf {
background-position-x: 20%,80%,center;
background-position-y: 15rem,15rem,center;
background-position-y: 10rem,10rem,center;
background-size: 25%,25%,100%}
}
@media only screen and (min-width : 1600px) {
.login-pf {
background-position-x: 30%,70%,center;
background-position-y: 15rem,15rem,center;
background-size: 35rem,35rem,100%;}
background-position-y: 10rem,10rem,center;
background-size: 25rem,25rem,100%;}
}
@media only screen and (min-width : 4000px) {
.login-pf {
background-position-x: 40%,60%,center;
background-position-y: 100px,50px,center;
background-size: 500px,500px,100%;}
}
h1 {
......@@ -85,5 +94,5 @@ h1 {
}
#kc-header-wrapper img {
width: 5rem;
width: 3.5rem;
}
parent=liiibre
locales=en,fr
styles=node_modules/patternfly/dist/css/patternfly.min.css node_modules/patternfly/dist/css/patternfly-additions.min.css lib/zocial/zocial.css css/login.css css/liiibre.css css/style.css
styles=css/tile.css css/login.css css/liiibre.css css/style.css
meta=viewport==width=device-width,initial-scale=1
logo=liiibreLogo.png
\ No newline at end of file
parent=liiibrelite
locales=en,fr
### kill hoster logo in footer
footerHosterStyle=display: none;
hosterLink=null
hosterLogoImg=null
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment