Merge branch 'v2.0'

This commit is contained in:
Xavier Guimard 2020-01-28 15:58:25 +01:00
commit 22a58a6f44
21 changed files with 33 additions and 11 deletions

View File

@ -10,9 +10,10 @@ extends 'Lemonldap::NG::Common::PSGI';
# Properties
has 'routes' => (
is => 'rw',
isa => 'HashRef',
default => sub { { GET => {}, POST => {}, PUT => {}, PATCH => {}, DELETE => {} } }
is => 'rw',
isa => 'HashRef',
default =>
sub { { GET => {}, POST => {}, PUT => {}, PATCH => {}, DELETE => {} } }
);
has 'defaultRoute' => ( is => 'rw', default => 'index.html' );
@ -75,7 +76,7 @@ sub genRoute {
elsif ( $t eq 'ARRAY' ) {
$routes->{$word} ||= {};
foreach my $w ( @{$dest} ) {
$self->genRoute( $routes->{$word}, $w, $transform );
$self->genRoute( $routes->{$word}, $w, $w, $transform );
}
return;
}

View File

@ -30,7 +30,7 @@ sub init {
%$prms = (
configStorage => { type => 'File', dirName => 't' },
localSessionStorage => '',
logLevel => 'debug',
logLevel => 'error',
cookieName => 'lemonldap',
securedCookie => 0,
https => 0,

View File

@ -2447,6 +2447,9 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'default' => 1,
'type' => 'bool'
},
'portalCustomCss' => {
'type' => 'text'
},
'portalDisplayAppslist' => {
'default' => 1,
'type' => 'boolOrExpr'

View File

@ -357,6 +357,10 @@ sub attributes {
test => $url,
msgFail => '__badUrl__',
},
portalCustomCss => {
type => 'text',
documentation => 'Path to custom CSS file',
},
portalStatus => {
type => 'bool',
default => 0,

View File

@ -63,6 +63,7 @@ sub tree {
nodes => [
'portalMainLogo',
'showLanguages',
'portalCustomCss',
'portalSkin',
'portalSkinBackground',
'portalSkinRules',

View File

@ -687,6 +687,7 @@
"portalButtons":"أزرار على صفحة تسجيل الدخول",
"portalCaptcha":"كلمة التحقق أو الكابتشا ",
"portalCheckLogins":"تحقق من آخر تسجيلات دخول",
"portalCustomCss":"Custom CSS file",
"portalCustomization":"التخصيص",
"portalDisplayAppslist":"قائمة التطبيقات",
"portalDisplayFavApps":"Activation rule",

View File

@ -687,6 +687,7 @@
"portalButtons":"Buttons on login page",
"portalCaptcha":"Captcha",
"portalCheckLogins":"Check last logins",
"portalCustomCss":"Custom CSS file",
"portalCustomization":"Customization",
"portalDisplayAppslist":"Applications list",
"portalDisplayFavApps":"Activation rule",

View File

@ -687,6 +687,7 @@
"portalButtons":"Buttons on login page",
"portalCaptcha":"Captcha",
"portalCheckLogins":"Check last logins",
"portalCustomCss":"Custom CSS file",
"portalCustomization":"Customization",
"portalDisplayAppslist":"Applications list",
"portalDisplayFavApps":"Activation rule",

View File

@ -687,6 +687,7 @@
"portalButtons":"Boutons sur la page de connexion",
"portalCaptcha":"Captcha",
"portalCheckLogins":"Vérifier l'historique",
"portalCustomCss":"Fichier CSS personnalisé",
"portalCustomization":"Personnalisation",
"portalDisplayAppslist":"Liste des applications",
"portalDisplayFavApps":"Règle d'utilisation",

View File

@ -687,6 +687,7 @@
"portalButtons":"Pulsanti nella pagina di login",
"portalCaptcha":"Captcha",
"portalCheckLogins":"Controllare ultimi accessi",
"portalCustomCss":"Custom CSS file",
"portalCustomization":"Personalizzazione",
"portalDisplayAppslist":"Lista delle applicazioni",
"portalDisplayFavApps":"Activation rule",

View File

@ -687,6 +687,7 @@
"portalButtons":"Giriş sayfasındaki butonlar",
"portalCaptcha":"Captcha",
"portalCheckLogins":"Son girişleri kontrol et",
"portalCustomCss":"Custom CSS file",
"portalCustomization":"Özelleştirme",
"portalDisplayAppslist":"Uygulamalar listesi",
"portalDisplayFavApps":"Activation rule",

View File

@ -687,6 +687,7 @@
"portalButtons":"Nút trên trang đăng nhập",
"portalCaptcha":"Captcha",
"portalCheckLogins":"Kiểm tra đăng nhập lần cuối",
"portalCustomCss":"Custom CSS file",
"portalCustomization":"Tùy chỉnh",
"portalDisplayAppslist":"Danh sách ứng dụng",
"portalDisplayFavApps":"Activation rule",

View File

@ -687,6 +687,7 @@
"portalButtons":"Buttons on login page",
"portalCaptcha":"Captcha",
"portalCheckLogins":"Check last logins",
"portalCustomCss":"Custom CSS file",
"portalCustomization":"Customization",
"portalDisplayAppslist":"Applications list",
"portalDisplayFavApps":"Activation rule",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1211,7 +1211,7 @@
"id": "cookieExpiration",
"title": "cookieExpiration",
"type": "int",
"data": "a"
"data": 0
}]
}, {
"id": "sessionParams",

View File

@ -758,6 +758,7 @@ sub cookie {
$h{max_age} //= $self->conf->{cookieExpiration}
if ( $self->conf->{cookieExpiration} );
$h{SameSite} ||= $self->conf->{sameSite};
foreach (qw(domain path expires max_age HttpOnly SameSite)) {
my $f = $_;
$f =~ s/_/-/g;
@ -984,6 +985,7 @@ sub tplParams {
PORTAL_URL => $self->conf->{portal},
SKIN_PATH => $portalPath . "skins",
SKIN_BG => $self->conf->{portalSkinBackground},
CUSTOM_CSS => $self->conf->{portalCustomCss},
( $self->customParameters ? ( %{ $self->customParameters } ) : () ),
%templateParams
);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.7
// Generated by CoffeeScript 1.12.8
/*
LemonLDAP::NG TOTP registration script

View File

@ -27,6 +27,9 @@
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="SKIN">/css/styles.css" />
<!-- //endif -->
<link rel="stylesheet" type="text/css" href="/portal.css" />
<TMPL_IF NAME="CUSTOM_CSS">
<link rel="stylesheet" type="text/css" href="<TMPL_VAR NAME="STATIC_PREFIX"><TMPL_VAR NAME="CUSTOM_CSS">" />
</TMPL_IF>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>