From b4102acf458f9b3c0c588e54c115c4b89e9e56c0 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Thu, 4 May 2017 07:13:26 +0000 Subject: [PATCH] May fix #852 --- .../lib/Lemonldap/NG/Manager/Attributes.pm | 20 +++++++++---------- .../lib/Lemonldap/NG/Portal/Main/Run.pm | 11 ++++++++-- .../site/htdocs/static/languages/de.json | 1 + .../site/htdocs/static/languages/en.json | 1 + .../site/htdocs/static/languages/es.json | 1 + .../site/htdocs/static/languages/fr.json | 1 + .../site/htdocs/static/languages/it.json | 1 + .../site/htdocs/static/languages/nl.json | 1 + .../site/htdocs/static/languages/pt.json | 1 + .../site/htdocs/static/languages/ro.json | 1 + .../site/htdocs/static/languages/vi.json | 1 + 11 files changed, 28 insertions(+), 12 deletions(-) diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm index 7a4d59b50..a75747a96 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Attributes.pm @@ -27,7 +27,7 @@ sub types { BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval "$s $val"; my $err = join( @@ -651,7 +651,7 @@ sub attributes { BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval "$s $val"; my $err = join( @@ -1004,7 +1004,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0- BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval $s; my $err = join( @@ -1086,7 +1086,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0- BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval "$s $val"; my $err = join( @@ -1109,7 +1109,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0- BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval "$s $val"; my $err = join( @@ -1432,7 +1432,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0- BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval $s; my $err = join( @@ -1469,7 +1469,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0- BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval "$s $val"; my $err = join( @@ -1817,7 +1817,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0- BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval "$s $val"; my $err = join( @@ -2146,7 +2146,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0- BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval "$s $val"; my $err = join( @@ -2816,7 +2816,7 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.] BEGIN { ${^WARNING_BITS} = -"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55\x05"; +"\x54\x55\x55\x55\x15\x55\x55\x55\x55\x55\x51\x55\x55\x55\x55\x55\x55"; } eval "$s $val"; my $err = join( diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm index 91cb8de43..b5645c3ad 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm @@ -114,8 +114,7 @@ sub refresh { foreach ( keys %datas ) { delete $datas{$_} unless ( /^_/ or /^(?:startTime)$/ ); } - return $self->do( - $req, + $req->steps( [ 'getUser', @{ $self->betweenAuthAndDatas }, @@ -131,6 +130,14 @@ sub refresh { 'store', ] ); + my $res = $req->error( $self->process($req) ); + if ($res) { + $req->info( +'

Rights reloads need to logout and login again

' + ); + return $self->do( $req, [ sub { PE_INFO } ] ); + } + return $self->do( $req, [ sub { PE_OK } ] ); } sub logout { diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/de.json b/lemonldap-ng-portal/site/htdocs/static/languages/de.json index 7568727e5..9ab53ee8d 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/de.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/de.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "selectIdP":"Select your Identity Provider", "sendPwd":"Send me a new password", "serverError":"Error occurs on the server", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/en.json b/lemonldap-ng-portal/site/htdocs/static/languages/en.json index 18677ed9d..f2f016d4b 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/en.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/en.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "selectIdP":"Select your Identity Provider", "sendPwd":"Send me a new password", "serverError":"Error occurs on the server", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/es.json b/lemonldap-ng-portal/site/htdocs/static/languages/es.json index a1f88948a..c6909fafd 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/es.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/es.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "selectIdP":"Select your Identity Provider", "sendPwd":"Send me a new password", "serverError":"Error occurs on the server", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/fr.json b/lemonldap-ng-portal/site/htdocs/static/languages/fr.json index 65f2d5bca..e558a6949 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/fr.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/fr.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Renvoyer le mail de confirmation ?", "resentConfirm":"Voulez-vous que le message de confirmation soit renvoyé ?", "resetPwd":"Réinitialiser mon mot de passe", +"rightsReloadNeedsLogout": "Le rechargement des droits nécessite une déconnexion", "selectIdP":"Choisissez votre fournisseur d'identité", "sendPwd":"Envoyez-moi un nouveau mot de passe", "serverError":"Une erreur est survenue sur le serveur", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/it.json b/lemonldap-ng-portal/site/htdocs/static/languages/it.json index bbff128a2..ffc09107b 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/it.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/it.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "selectIdP":"Select your Identity Provider", "sendPwd":"Send me a new password", "serverError":"Error occurs on the server", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/nl.json b/lemonldap-ng-portal/site/htdocs/static/languages/nl.json index 29ea3e890..a96ca1911 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/nl.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/nl.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "selectIdP":"Select your Identity Provider", "sendPwd":"Send me a new password", "serverError":"Error occurs on the server", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/pt.json b/lemonldap-ng-portal/site/htdocs/static/languages/pt.json index 8fad52a38..00b3459a6 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/pt.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/pt.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "selectIdP":"Select your Identity Provider", "sendPwd":"Send me a new password", "serverError":"Error occurs on the server", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/ro.json b/lemonldap-ng-portal/site/htdocs/static/languages/ro.json index 496ec7546..b09eb14ac 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/ro.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/ro.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Resend confirmation mail?", "resentConfirm":"Do you want the confirmation mail to be resent?", "resetPwd":"Reset my password", +"rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "selectIdP":"Select your Identity Provider", "sendPwd":"Send me a new password", "serverError":"Error occurs on the server", diff --git a/lemonldap-ng-portal/site/htdocs/static/languages/vi.json b/lemonldap-ng-portal/site/htdocs/static/languages/vi.json index 3cc6e8369..926a1645c 100644 --- a/lemonldap-ng-portal/site/htdocs/static/languages/vi.json +++ b/lemonldap-ng-portal/site/htdocs/static/languages/vi.json @@ -175,6 +175,7 @@ "resendConfirmMail":"Gửi lại thư xác nhận?", "resentConfirm":"Bạn có muốn gửi lại thư xác nhận không?", "resetPwd":"Đặt lại mật khẩu của tôi", +"rightsReloadNeedsLogout": "Rights reloads need to logout and login again", "selectIdP":"Chọn bộ cung cấp danh tính của bạn", "sendPwd":"Gửi cho tôi một mật khẩu mới", "serverError":"Lỗi xảy ra trên máy chủ",