From 5531cc1f3c72d7231d83842a98aed6f7ad67a169 Mon Sep 17 00:00:00 2001
From: gnaegi <none@none>
Date: Mon, 17 Aug 2015 15:00:43 +0200
Subject: [PATCH] OO-1651 add shib url to admin gui, improve wording

---
 .../shibboleth/ShibbolethAdminController.java     |  4 ++++
 .../shibboleth/_i18n/LocalStrings_de.properties   | 15 ++++++++-------
 .../shibboleth/_i18n/LocalStrings_en.properties   |  9 +++++----
 3 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/main/java/org/olat/shibboleth/ShibbolethAdminController.java b/src/main/java/org/olat/shibboleth/ShibbolethAdminController.java
index a4b3803f538..4c6bd3b3886 100644
--- a/src/main/java/org/olat/shibboleth/ShibbolethAdminController.java
+++ b/src/main/java/org/olat/shibboleth/ShibbolethAdminController.java
@@ -29,6 +29,8 @@ import org.olat.core.gui.components.form.flexible.impl.FormEvent;
 import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer;
 import org.olat.core.gui.control.Controller;
 import org.olat.core.gui.control.WindowControl;
+import org.olat.core.helpers.Settings;
+import org.olat.core.util.WebappHelper;
 import org.springframework.beans.factory.annotation.Autowired;
 
 /**
@@ -58,6 +60,8 @@ public class ShibbolethAdminController extends FormBasicController {
 		setFormTitle("admin.title");
 		setFormDescription("admin.description");
 		
+		uifactory.addStaticTextElement("admin.ac.url", Settings.getServerContextPathURI() + "/shib/", formLayout);
+		
 		boolean enabled = shibbolethModule.isAccessControlByAttributes();
 		String[] values = new String[]{ translate("enabled") };
 		attributeEl = uifactory.addCheckboxesHorizontal("admin.ac.attribute", formLayout, keys, values);
diff --git a/src/main/java/org/olat/shibboleth/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/shibboleth/_i18n/LocalStrings_de.properties
index 350aae88b6a..d9938120217 100644
--- a/src/main/java/org/olat/shibboleth/_i18n/LocalStrings_de.properties
+++ b/src/main/java/org/olat/shibboleth/_i18n/LocalStrings_de.properties
@@ -1,12 +1,13 @@
 #Fri Oct 09 12:13:13 CEST 2009
-admin.ac.attribute=Activate attribute access control
-admin.ac.attribute.1=Shibboleth attribute 1
-admin.ac.attribute.2=Shibboleth attribute 2
-admin.ac.value.1=Allowed values
-admin.ac.value.2=Allowed values
-admin.description=Use the form below...
+admin.ac.attribute=Attribute Access Control aktivieren
+admin.ac.attribute.1=Shibboleth Attribut 1
+admin.ac.attribute.2=Shibboleth Attribut 2
+admin.ac.url=Direktlink für SSO Zugang
+admin.ac.value.1=Gültige Werte für Attribut 1
+admin.ac.value.2=Gültige Werte für Attribut 2
+admin.description=Die Shibboleth Basiskonfiguration muss in der OpenOLAT Konfigurationsdatei vorgenommen werden. Mittels des untenstehenden Formulars können Sie die optionale Autorisierung der Benutzer mitels Prüfung von Shibboleth Attributen einschalten. Es können maximal zwei Attribute mit den jeweils zugelassenen Werten festgelegt werden. Eine Person gilt als Autorisiert wenn 1) die Person erfolgreich sich bei seinem IDP authentifizieren kann und 2) eines der beiden konfigurierten Attribute in der jeweiligen Werteliste gefunden werden kann. 
 admin.menu.shibboleth=Shibboleth
-admin.menu.shibboleth.desc=Shibboleth
+admin.menu.shibboleth.desc=Konfiguration Shibboleth Modul
 admin.title=Shibboleth auhorization
 authentication.provider.description=Sind Sie Mitglied einer Institution mit Shibboleth Loginverfahren?
 authentication.provider.linkText=Anmelden mit Shibboleth Konto
diff --git a/src/main/java/org/olat/shibboleth/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/shibboleth/_i18n/LocalStrings_en.properties
index 6ba28acbfc7..23c57f11cc8 100644
--- a/src/main/java/org/olat/shibboleth/_i18n/LocalStrings_en.properties
+++ b/src/main/java/org/olat/shibboleth/_i18n/LocalStrings_en.properties
@@ -2,11 +2,12 @@
 admin.ac.attribute=Activate attribute access control
 admin.ac.attribute.1=Shibboleth attribute 1
 admin.ac.attribute.2=Shibboleth attribute 2
-admin.ac.value.1=Allowed values
-admin.ac.value.2=Allowed values
-admin.description=Use the forms below to configure optional authorization rules. this is usefull when you want to restrict access to this OpenOLAT resource provider based on Shibboleth attributes because not all users which successfully authenticated against your IDP are allowed to access this resource. If one of the rule below matches, the user is authorized to access this OpenOLAT installation (OR conjunction). If the user does not have the necessary attributes, access is denied.
+admin.ac.url=Direct link for SSO access
+admin.ac.value.1=Allowed values for attribute 1
+admin.ac.value.2=Allowed values for attribute 2
+admin.description=Use the forms below to configure optional authorization rules. This is usefull when you want to restrict access to this OpenOLAT resource provider based on Shibboleth attributes because not all users which successfully authenticated against your IDP are allowed to access this resource. If one of the rule below matches, the user is authorized to access this OpenOLAT installation (OR conjunction). If the user does not have the necessary attributes, access is denied. Each value on the value list is treated as a valid value (no multi-line values).
 admin.menu.shibboleth=Shibboleth
-admin.menu.shibboleth.desc=Shibboleth
+admin.menu.shibboleth.desc=Configuration Shibboleth module
 admin.title=Shibboleth auhorization
 authentication.provider.description=Are you a member of an institutions that uses Shibboleth authentication?
 authentication.provider.linkText=Login with Shibboleth account
-- 
GitLab