|
- ${%User ID} |
- ${%Name} |
+ ${%Username} |
+ ${%Full name} |
|
|
@@ -59,14 +59,14 @@ THE SOFTWARE.
- ${user.id}
+ ${user.id}
|
${user.fullName}
|
@@ -74,8 +74,12 @@ THE SOFTWARE.
|
-
+
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.properties
index bbce49c657..45d6df5fbd 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.properties
@@ -20,8 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-blurb=\
-These users can log into Jenkins. This is a sub set of this list, \
-which also contains auto-created users who really just made some commits on some projects and have no \
-direct Jenkins access.
delete.user=Delete Jenkins user ‘{0}’?
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_bg.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_bg.properties
index 776e5328a1..fe69b15db0 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_bg.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_bg.properties
@@ -24,10 +24,5 @@ Name=\
Име
Users=\
Потребители
-blurb=\
- Тези потребители могат да се впишат в Jenkins. Това е съкратена версия на\
- този списък, който съдържа също и автоматично\
- създадените потребители, които някога са подавали промени по някои проекти и\
- нямат директен достъп до Jenkins.
User\ Id=\
Идентификатор
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_da.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_da.properties
index ad6da23caf..03a148422b 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_da.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_da.properties
@@ -20,5 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-blurb=Disse brugere kan logge på Jenkins. Dette er en delmængde af denne liste
Name=Navn
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_de.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_de.properties
index 1597a62360..48da8cbf16 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_de.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_de.properties
@@ -20,8 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-blurb=\
- Diese Benutzer können sich bei Jenkins anmelden. Dies ist eine Untermenge jener Liste, die zusätzlich automatisch angelegte Benutzer enthalten kann. Diese Benutzer haben zwar Commits zu Projekten beigetragen, dürfen sich aber nicht direkt bei Jenkins anmelden.
Name=Name
User\ Id=Benutzer-ID
Users=Benutzer
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_es.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_es.properties
index 929a0d9444..fbc8b0384b 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_es.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_es.properties
@@ -20,10 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-blurb=\
- Estos usuarios pueden entrar en Jenkins. Este es un subconjunto de esta lista, \
- que tambien incluyen usuarios creados automáticamente porque hayan hecho ''commits'' a proyectos. \
- Los usuarios creados automáticamente no tienen acceso directo a Jenkins.
Name=Nombre
Users=Usuarios
User\ Id=ID usuario
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_fr.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_fr.properties
index 6f8d0f1c20..77ca3c81e0 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_fr.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_fr.properties
@@ -21,5 +21,4 @@
# THE SOFTWARE.
Users=Utilisateurs
-blurb=Ces utilisateurs peuvent se logguer sur Jenkins. C''est le groupe contenant cette liste, qui contient également les utilisateurs créés automatiquement qui ont simplement fait des commits sur certains projets et n''ont pas d''accès direct à Jenkins.
Name=Nom
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_it.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_it.properties
index 5ac7a494e5..a2c052c8ba 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_it.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_it.properties
@@ -21,10 +21,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-blurb=Questi utenti possono accedere a Jenkins. Questo è un sottoinsieme \
- di quest''elenco, che contiene anche gli \
- utenti creati automaticamente che hanno solamente eseguito dei commit in \
- alcuni progetti e non hanno accesso diretto a Jenkins.
Name=Nome
User\ ID=ID utente
Users=Utenti
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ja.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ja.properties
index e1a59d0325..6fabdbdf9b 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ja.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ja.properties
@@ -21,8 +21,5 @@
# THE SOFTWARE.
User\ Id=ユーザーID
-blurb=\
- これらのユーザーはJenkinsにログインすることができます。これは、Jenkinsにアクセスしていないけれども \
- いくつかのプロジェクトにコミットすると自動的に作成されるユーザーを含むこのリストの一部です。
Name=名前
Users=ユーザー
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ko.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ko.properties
index e8ce68caf5..32ea8b1ceb 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ko.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ko.properties
@@ -23,4 +23,3 @@
Name=이름
User\ Id=사용자 ID
Users=사용자
-blurb=이 사용자들은 Jenkins 에 로그인 할 수 있습니다. 이 사용자들은 개발자 목록의 일부입니다. 개발자 목록은 단지 커밋만 하고 직접 Jenkins 에 접속하지 않은 자동 생성된 사람들을 포함합니다.
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_nb_NO.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_nb_NO.properties
index 7f5398610a..c266fb7ff8 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_nb_NO.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_nb_NO.properties
@@ -23,4 +23,3 @@
Name=Navn
User\ Id=Bruker-id
Users=Brukere
-blurb=Disse brukerne kan logge inn på Jenkins. De er et subsett av dene listen, som også inneholder autogenererte brukere som egentlig bare har sjekket inn på noen prosjekter og ikke har direkte jenkins-tilgang.
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_nl.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_nl.properties
index 0274709c47..b3ca0b8e82 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_nl.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_nl.properties
@@ -3,4 +3,3 @@
Name=Naam
User\ Id=Gebruikersnaam
Users=Gebruikers
-blurb=Deze gebruikers kunnen op Jenkins inloggen. Dit is een sub set van deze lijst, deze bevat ook automatisch aangemaakte gebruikers die hebben bijgedragen bij een of meer projecten maar die geen directe toegang tot Jenkins hebben.
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_pt_BR.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_pt_BR.properties
index c4945f3da1..64da07ea4b 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_pt_BR.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_pt_BR.properties
@@ -22,6 +22,5 @@
Name=Nome
Users=Usuários
-blurb=Esses usuários podem entrar no Jenkins. Este é um sub-conjunto desta lista, que também contém os usuários criados de forma automática ao executarem alguma confirmação nos projetos que o Jenkins tem acesso.
User\ ID=Identificação do usuário
Create\ User=Criar Usuário
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_pt_PT.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_pt_PT.properties
index ea787bb690..06d23b172c 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_pt_PT.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_pt_PT.properties
@@ -3,4 +3,3 @@
Name=Nome
User\ Id=Id Utilizador
Users=Utilizadores
-blurb=Estes utilizadores conseguem autenticar-se no Jenkins. Este é um sub conjunto desta lista, que também contém utilizadores auto-criados que só realizaram alguns commits nalgum projecto e não têm acesso directo no Jenkins.
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ru.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ru.properties
index cb4cb571d3..6073ef3cb9 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ru.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_ru.properties
@@ -23,4 +23,3 @@
Name=Имя
User\ Id=ID пользователя
Users=Пользователи
-blurb=Перечисленные пользователи могут входить в Jenkins. Указанный список является подмножеством полного списка пользователей, который в дополнение содержит автоматически созданных пользователей, которые вносили изменения в проекты (делали commit в SCM), и могут не иметь доступа к данному экземпляру Jenkins.
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_sr.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_sr.properties
index a5e2014b35..b011497107 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_sr.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_sr.properties
@@ -1,8 +1,5 @@
# This file is under the MIT License by authors
Users=Корисници
-blurb=\
-Ови корисниви могу се пријавити на Jenkins, што је подскуп овог списка, \
-који садржи и аутоматски-креиране кориснике без кирекног приступа на Jenkins.
User\ Id=Идентификациони број корисника
Name=Име
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_sv_SE.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_sv_SE.properties
index bd81d7b4fd..8469971d25 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_sv_SE.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_sv_SE.properties
@@ -20,10 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-blurb=\
-Dessa användare kan logga in på Jenkins. Detta är en delmängd av denna lista \
-som även innehåller automatiskt skapade användare som egentligen bara gjort några incheckningar på vissa projekt\
-och saknar direkt åtkomst till Jenkins.
delete.user=Radera Jenkins-användaren "{0}"?
Name=Namn
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_tr.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_tr.properties
index 836f8ef579..cbc225c3e1 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_tr.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_tr.properties
@@ -22,9 +22,5 @@
Users=Kullanıcılar
Create\ User=Kullanıcı Oluştur
-blurb=\
-Bu kullanıcılar Jenkins''de oturum açabilir. Bu liste, buradakinin bir üst kümesidir, \
-aynı zamanda bazı projelerde commit işlemi yapan, fakat direk Jenkins erişimi olmayan ve otomatik olarak oluşturulan \
-kullanıcıları da içerir
User\ ID=Kullanıcı ID
Name=İsim
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_zh_TW.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_zh_TW.properties
index ce0ab58090..ba95f91071 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_zh_TW.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index_zh_TW.properties
@@ -22,8 +22,5 @@
# THE SOFTWARE.
Users=使用者
-blurb=\
- 這些使用者可以登入 Jenkins。這是這份清單的子集合,\
- 該清單包含自動建立,只在某些專案上 Commit 東西的使用者,這類使用者不能直接使用 Jenkins。
User\ Id=使用者識別碼
Name=名稱
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signupWithFederatedIdentity.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signupWithFederatedIdentity.jelly
index 83f9eef9ec..9aad719b12 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signupWithFederatedIdentity.jelly
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signupWithFederatedIdentity.jelly
@@ -27,5 +27,5 @@ THE SOFTWARE.
-->
-
+
diff --git a/core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser.jelly b/core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser.jelly
index e54fd011a6..694938ff7e 100644
--- a/core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser.jelly
+++ b/core/src/main/resources/jenkins/install/SetupWizard/setupWizardFirstUser.jelly
@@ -5,7 +5,7 @@
diff --git a/src/main/js/components/dialogs/index.js b/src/main/js/components/dialogs/index.js
index 7e3582adcf..f1913a5ce4 100644
--- a/src/main/js/components/dialogs/index.js
+++ b/src/main/js/components/dialogs/index.js
@@ -331,6 +331,12 @@ function init() {
let dialog = new Dialog("form", options);
return dialog.show();
},
+
+ wizard: function (initialUrl, options) {
+ dialog.modal(document.createElement("template"), options);
+
+ navigateToNextPage(initialUrl, "");
+ },
};
behaviorShim.specify(
@@ -339,7 +345,14 @@ function init() {
1000,
(element) => {
element.addEventListener("click", () => {
- renderOnDemandDialog(element.dataset.dialogId);
+ if (element.dataset.dialogUrl != null) {
+ window.dialog.wizard(element.dataset.dialogUrl, {
+ minWidth: "min(550px, 100vw)",
+ preventCloseOnOutsideClick: true,
+ });
+ } else {
+ renderOnDemandDialog(element.dataset.dialogId);
+ }
});
},
);
@@ -357,4 +370,201 @@ function init() {
}
}
+function updateWizardTitle(titleText) {
+ if (titleText == null) {
+ return;
+ }
+
+ const title = document.querySelector(
+ ".jenkins-dialog .jenkins-dialog__title > span",
+ );
+ if (title != null) {
+ title.textContent = titleText;
+ }
+}
+
+/** Resolve a relative wizard form action against the current step URL. */
+function resolveWizardFormAction(form, baseUrl) {
+ const formAction = form.getAttribute("action");
+ if (
+ formAction &&
+ !formAction.startsWith("/") &&
+ !formAction.startsWith("http")
+ ) {
+ form.action = new URL(formAction, baseUrl).toString();
+ }
+}
+
+function submitWizardForm(form) {
+ const jsonInputName = "json";
+ let jsonInput = form.elements.namedItem(jsonInputName);
+
+ if (jsonInput == null) {
+ jsonInput = document.createElement("input");
+ jsonInput.type = "hidden";
+ jsonInput.name = jsonInputName;
+ form.appendChild(jsonInput);
+ }
+
+ buildFormTree(form);
+
+ let body = new FormData(form);
+ const hasFileInput = Array.from(form.elements).some(
+ (element) => element instanceof HTMLInputElement && element.type === "file",
+ );
+
+ if (!hasFileInput) {
+ body = new URLSearchParams(body);
+ }
+
+ fetch(form.action, {
+ method: form.method.toUpperCase(),
+ headers: crumb.wrap({}),
+ body: body,
+ }).then((rsp) => {
+ if (rsp.redirected) {
+ window.location.assign(rsp.url);
+ return;
+ }
+
+ rsp.text().then((responseText) => {
+ const replacementForm = renderWizardForm({
+ responseText,
+ requestUrl: rsp.url,
+ titleText: rsp.headers.get("X-Dialog-Title"),
+ replaceExistingForm: form,
+ });
+
+ if (replacementForm == null) {
+ window.location.assign(rsp.url);
+ }
+ });
+ });
+}
+
+function configureWizardForm(form) {
+ form.addEventListener("submit", (e) => {
+ e.preventDefault();
+ submitWizardForm(e.currentTarget);
+ });
+}
+
+function renderWizardForm({
+ responseText,
+ requestUrl,
+ titleText,
+ replaceExistingForm = null,
+ hideExistingForms = false,
+}) {
+ const dialogContents = document.querySelector(
+ ".jenkins-dialog .jenkins-dialog__contents",
+ );
+ const newDialog = document.createElement("div");
+ newDialog.innerHTML = responseText;
+
+ const form = newDialog.querySelector("form");
+ if (form == null) {
+ return null;
+ }
+
+ if (hideExistingForms) {
+ Array.from(dialogContents.children)
+ .filter((element) => element.tagName === "FORM")
+ .forEach((existingForm) => existingForm.classList.add("jenkins-hidden"));
+ }
+
+ resolveWizardFormAction(form, requestUrl);
+ updateWizardTitle(titleText);
+ configureWizardForm(form);
+
+ // Recreate script tags while the form is still detached, so each script
+ // executes exactly once, at the moment the form is inserted into the dialog.
+ recreateScripts(form);
+
+ if (replaceExistingForm != null) {
+ replaceExistingForm.replaceWith(form);
+ } else {
+ dialogContents.appendChild(form);
+ }
+
+ wireCancelButton(form);
+
+ return form;
+}
+
+function wireCancelButton(form) {
+ const dialog = form.closest("dialog");
+ form.querySelector("[data-id=cancel]")?.addEventListener("click", (e) => {
+ e.preventDefault();
+ dialog?.dispatchEvent(new Event("cancel"));
+ });
+}
+
+function navigateToNextPage(url) {
+ fetch(url, {
+ method: "GET",
+ headers: crumb.wrap({}),
+ }).then((rsp) => {
+ if (rsp.ok) {
+ rsp.text().then((responseText) => {
+ const form = renderWizardForm({
+ responseText,
+ requestUrl: rsp.url,
+ titleText: rsp.headers.get("X-Dialog-Title"),
+ hideExistingForms: true,
+ });
+
+ if (form == null) {
+ window.location.assign(rsp.url);
+ }
+ });
+ } else {
+ console.error(
+ "Failed to load dialog content, response from API is:",
+ rsp,
+ );
+ }
+ });
+}
+
+/*
+ * Recreate script tags to ensure they are executed, as innerHTML does not execute scripts.
+ *
+ */
+function recreateScripts(form) {
+ const scripts = Array.from(form.getElementsByTagName("script"));
+ if (scripts.length === 0) {
+ Behaviour.applySubtree(form, true);
+ return;
+ }
+ for (let i = 0; i < scripts.length; i++) {
+ const original = scripts[i];
+ const script = document.createElement("script");
+
+ for (let j = 0; j < original.attributes.length; j++) {
+ script.setAttribute(
+ original.attributes[j].name,
+ original.attributes[j].value,
+ );
+ }
+ if (original.text) {
+ script.text = original.text;
+ }
+
+ // only attach the load listener to the last script to avoid multiple calls to Behaviour.applySubtree
+ if (i === scripts.length - 1) {
+ script.addEventListener("load", () => {
+ setTimeout(() => {
+ Behaviour.applySubtree(form, true);
+ if (form.method.toLowerCase() !== "get") {
+ form.onsubmit = null; // clear any existing handler
+ }
+ }, 50);
+ });
+ }
+
+ original.parentNode.replaceChild(script, original);
+ }
+}
+
export default { init };
diff --git a/src/main/scss/components/_dialogs.scss b/src/main/scss/components/_dialogs.scss
index d28e9d6e76..0b9cca70c8 100644
--- a/src/main/scss/components/_dialogs.scss
+++ b/src/main/scss/components/_dialogs.scss
@@ -14,6 +14,7 @@ $jenkins-dialog-padding: 1.25rem;
padding: 0;
display: flex;
flex-direction: column;
+ color: var(--text-color);
// Thin highlight for dark themes to differentiate the dialog from its backdrop
outline: 1px solid rgb(255 255 255 / 0.05);
|