diff --git a/lang/en_US/LC_MESSAGES/oauth2.mo b/lang/en_US/LC_MESSAGES/oauth2.mo index 9ac5bab..38d554a 100644 Binary files a/lang/en_US/LC_MESSAGES/oauth2.mo and b/lang/en_US/LC_MESSAGES/oauth2.mo differ diff --git a/lang/fr_FR.utf8/LC_MESSAGES/oauth2.mo b/lang/fr_FR.utf8/LC_MESSAGES/oauth2.mo index 56f3850..50f42bc 100644 Binary files a/lang/fr_FR.utf8/LC_MESSAGES/oauth2.mo and b/lang/fr_FR.utf8/LC_MESSAGES/oauth2.mo differ diff --git a/lang/fr_FR/LC_MESSAGES/oauth2.mo b/lang/fr_FR/LC_MESSAGES/oauth2.mo index f2511d7..50f42bc 100644 Binary files a/lang/fr_FR/LC_MESSAGES/oauth2.mo and b/lang/fr_FR/LC_MESSAGES/oauth2.mo differ diff --git a/lang/oauth2.pot b/lang/oauth2.pot index 02b00d7..bf90167 100644 --- a/lang/oauth2.pot +++ b/lang/oauth2.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-25 04:17+0200\n" +"POT-Creation-Date: 2026-09-27 07:46+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,121 +17,113 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:119 -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:255 +#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:74 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:270 #, php-format msgid "Sign in with %s" msgstr "" -#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:124 +#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:79 #, php-format msgid "%s is requesting access to the following details" msgstr "" -#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:203 -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:162 -#, php-format -msgid "Default scope (%s) has not been authorized." +#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:200 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:219 +msgid "An error occurred" msgstr "" -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:81 -#: ../lib/GaletteOAuth2/Middleware/Authentication.php:69 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:82 +#: ../lib/GaletteOAuth2/Middleware/Authentication.php:65 msgid "Unknown client application" msgstr "" -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:210 -msgid "An error occurred" -msgstr "" - -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:216 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:225 #: ../templates/default/oauth2_error.html.twig:15 msgid "OAuth2 error" msgstr "" -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:275 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:79 msgid "Cannot OAuth login from superadmin account!" msgstr "" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:87 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:97 msgid "Check your login / email or password." msgstr "" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:127 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:129 msgid "User not found." msgstr "" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:132 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:134 msgid "Sorry, you can't login because you are not an active member." msgstr "" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:137 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:139 msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:145 +msgid "Sorry, you can't login because you are not a team member." +msgstr "" + +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:153 +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:164 +#, php-format +msgid "Default scope (%s) has not been authorized." msgstr "" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:33 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:38 msgid "" -"Access to your member basic information: name, login, email, language, " -"company name)" +"Access to your member basic information: name, login, email, language, status" msgstr "" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:36 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:41 msgid "" "Access to more precise personal data: birth date, job, gender, birth place, " "GnuPG ID" msgstr "" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:39 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:44 msgid "Access to your localization data: zipcode, town, region, country" msgstr "" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:42 -msgid "" -"Access to your precise localisation data: full address, coordinates (from " -"maps plugin)" +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:47 +msgid "Access to your precise localization data: full address" msgstr "" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:45 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:50 msgid "Access to your phone numbers" msgstr "" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:48 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:53 msgid "Access to your social networks data" msgstr "" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:51 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:56 msgid "Access to the groups you belong to" msgstr "" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:54 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:59 msgid "Access to your due date" msgstr "" -#: ../templates/default/oauth2_authorize.html.twig:17 +#: ../templates/default/oauth2_authorize.html.twig:22 msgid "Default scope is mandatory and cannot be unselected" msgstr "" -#: ../templates/default/oauth2_authorize.html.twig:17 -#, php-format -msgid "Give acces to '%1$s' scope" -msgstr "" - -#: ../templates/default/oauth2_authorize.html.twig:29 +#: ../templates/default/oauth2_authorize.html.twig:36 msgid "Cancel" msgstr "" -#: ../templates/default/oauth2_authorize.html.twig:34 +#: ../templates/default/oauth2_authorize.html.twig:41 msgid "Allow" msgstr "" diff --git a/lang/oauth2_ar.utf8.po b/lang/oauth2_ar.utf8.po index ce69219..e5c4814 100644 --- a/lang/oauth2_ar.utf8.po +++ b/lang/oauth2_ar.utf8.po @@ -51,7 +51,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -75,11 +75,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_br.utf8.po b/lang/oauth2_br.utf8.po index 8731d73..63ec54b 100644 --- a/lang/oauth2_br.utf8.po +++ b/lang/oauth2_br.utf8.po @@ -54,7 +54,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -78,11 +78,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_ca.utf8.po b/lang/oauth2_ca.utf8.po index fe8e7cb..4fb8783 100644 --- a/lang/oauth2_ca.utf8.po +++ b/lang/oauth2_ca.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_de.utf8.po b/lang/oauth2_de.utf8.po index d6e0a58..5f6f660 100644 --- a/lang/oauth2_de.utf8.po +++ b/lang/oauth2_de.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_en_US.po b/lang/oauth2_en_US.po index 0e3353e..3594283 100644 --- a/lang/oauth2_en_US.po +++ b/lang/oauth2_en_US.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: plugin-oauth 2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-09-25 04:17+0200\n" -"PO-Revision-Date: 2026-09-25 04:17+0200\n" +"POT-Creation-Date: 2026-09-27 07:46+0200\n" +"PO-Revision-Date: 2026-09-27 07:46+0200\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: en_US\n" @@ -17,79 +17,77 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:119 -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:255 +#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:74 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:270 #, php-format msgid "Sign in with %s" msgstr "Sign in with %s" -#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:124 +#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:79 #, php-format msgid "%s is requesting access to the following details" msgstr "%s is requesting access to the following details" -#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:203 -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:162 -#, php-format -msgid "Default scope (%s) has not been authorized." -msgstr "Default scope (%s) has not been authorized." +#: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:200 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:219 +msgid "An error occurred" +msgstr "An error occurred" -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:81 -#: ../lib/GaletteOAuth2/Middleware/Authentication.php:69 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:82 +#: ../lib/GaletteOAuth2/Middleware/Authentication.php:65 msgid "Unknown client application" msgstr "Unknown client application" -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:210 -msgid "An error occurred" -msgstr "An error occurred" - -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:216 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:225 #: ../templates/default/oauth2_error.html.twig:15 msgid "OAuth2 error" msgstr "OAuth2 error" -#: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 +#: ../lib/GaletteOAuth2/Controllers/LoginController.php:275 #, php-format -msgid "Sign in %s" -msgstr "Sign in %s" +msgid "Sign in to %s" +msgstr "Sign in to %s" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:79 msgid "Cannot OAuth login from superadmin account!" msgstr "Cannot OAuth login from superadmin account!" -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:87 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:97 msgid "Check your login / email or password." msgstr "Check your login / email or password." -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:127 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:129 msgid "User not found." msgstr "User not found." -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:132 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:134 msgid "Sorry, you can't login because you are not an active member." msgstr "Sorry, you can't login because you are not an active member." -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:137 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:139 msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "Sorry, you can't login. Please, add an email address to your account." -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." -msgstr "Sorry, you can't login because your are not a team member." +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:145 +msgid "Sorry, you can't login because you are not a team member." +msgstr "Sorry, you can't login because you are not a team member." -#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." -msgstr "Sorry, you can't login because your are not an up-to-date member." +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:153 +msgid "Sorry, you can't login because you are not an up-to-date member." +msgstr "Sorry, you can't login because you are not an up-to-date member." -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:33 +#: ../lib/GaletteOAuth2/Authorization/UserHelper.php:164 +#, php-format +msgid "Default scope (%s) has not been authorized." +msgstr "Default scope (%s) has not been authorized." + +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:38 msgid "" -"Access to your member basic information: name, login, email, language, " -"company name)" +"Access to your member basic information: name, login, email, language, status" msgstr "" -"Access to your member basic information: name, login, email, language, " -"company name)" +"Access to your member basic information: name, login, email, language, status" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:36 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:41 msgid "" "Access to more precise personal data: birth date, job, gender, birth place, " "GnuPG ID" @@ -97,47 +95,38 @@ msgstr "" "Access to more precise personal data: birth date, job, gender, birth place, " "GnuPG ID" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:39 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:44 msgid "Access to your localization data: zipcode, town, region, country" msgstr "Access to your localization data: zipcode, town, region, country" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:42 -msgid "" -"Access to your precise localisation data: full address, coordinates (from " -"maps plugin)" -msgstr "" -"Access to your precise localisation data: full address, coordinates (from " -"maps plugin)" +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:47 +msgid "Access to your precise localization data: full address" +msgstr "Access to your precise localization data: full address" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:45 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:50 msgid "Access to your phone numbers" msgstr "Access to your phone numbers" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:48 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:53 msgid "Access to your social networks data" msgstr "Access to your social networks data" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:51 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:56 msgid "Access to the groups you belong to" msgstr "Access to the groups you belong to" -#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:54 +#: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:59 msgid "Access to your due date" msgstr "Access to your due date" -#: ../templates/default/oauth2_authorize.html.twig:17 +#: ../templates/default/oauth2_authorize.html.twig:22 msgid "Default scope is mandatory and cannot be unselected" msgstr "Default scope is mandatory and cannot be unselected" -#: ../templates/default/oauth2_authorize.html.twig:17 -#, php-format -msgid "Give acces to '%1$s' scope" -msgstr "Give acces to '%1$s' scope" - -#: ../templates/default/oauth2_authorize.html.twig:29 +#: ../templates/default/oauth2_authorize.html.twig:36 msgid "Cancel" msgstr "Cancel" -#: ../templates/default/oauth2_authorize.html.twig:34 +#: ../templates/default/oauth2_authorize.html.twig:41 msgid "Allow" msgstr "Allow" diff --git a/lang/oauth2_es.utf8.po b/lang/oauth2_es.utf8.po index d8d4ccf..5f21cf7 100644 --- a/lang/oauth2_es.utf8.po +++ b/lang/oauth2_es.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_fr_FR.utf8.po b/lang/oauth2_fr_FR.utf8.po index 48d2050..b4ae5f2 100644 --- a/lang/oauth2_fr_FR.utf8.po +++ b/lang/oauth2_fr_FR.utf8.po @@ -25,7 +25,7 @@ msgstr "Se connecter avec %s" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:205 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "Connecter %s" #: ../lib/GaletteOAuth2/Controllers/AuthorizationController.php:137 @@ -60,11 +60,11 @@ msgstr "" "courriel valide à votre compte." #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:140 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "Désolé, vous n'êtes pas membre de l'équipe." #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:148 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" "Désolé, vous ne pouvez pas vous connecter car vous n'êtes pas à jour de " "votre cotisation." diff --git a/lang/oauth2_it.utf8.po b/lang/oauth2_it.utf8.po index 3dbbb2a..4da64e1 100644 --- a/lang/oauth2_it.utf8.po +++ b/lang/oauth2_it.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_nb_NO.utf8.po b/lang/oauth2_nb_NO.utf8.po index cd9c292..035df55 100644 --- a/lang/oauth2_nb_NO.utf8.po +++ b/lang/oauth2_nb_NO.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_oc.utf8.po b/lang/oauth2_oc.utf8.po index 9ac8caa..75462cf 100644 --- a/lang/oauth2_oc.utf8.po +++ b/lang/oauth2_oc.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_ota.utf8.po b/lang/oauth2_ota.utf8.po index a1720a4..50add61 100644 --- a/lang/oauth2_ota.utf8.po +++ b/lang/oauth2_ota.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_pt.utf8.po b/lang/oauth2_pt.utf8.po index 390f713..9de5b90 100644 --- a/lang/oauth2_pt.utf8.po +++ b/lang/oauth2_pt.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_pt_BR.utf8.po b/lang/oauth2_pt_BR.utf8.po index a793e21..9a85760 100644 --- a/lang/oauth2_pt_BR.utf8.po +++ b/lang/oauth2_pt_BR.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_ru.utf8.po b/lang/oauth2_ru.utf8.po index 95abb10..cf10494 100644 --- a/lang/oauth2_ru.utf8.po +++ b/lang/oauth2_ru.utf8.po @@ -51,7 +51,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -75,11 +75,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_si.utf8.po b/lang/oauth2_si.utf8.po index d87aad3..7e10c56 100644 --- a/lang/oauth2_si.utf8.po +++ b/lang/oauth2_si.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_sl.utf8.po b/lang/oauth2_sl.utf8.po index e50320d..023722d 100644 --- a/lang/oauth2_sl.utf8.po +++ b/lang/oauth2_sl.utf8.po @@ -53,7 +53,7 @@ msgstr "Napaka OAuth2" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "Prijavite se %s" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -78,11 +78,11 @@ msgstr "" "Žal se ne morete prijaviti. Prosimo, dodajte e-poštni naslov v svoj račun." #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "Žal se ne morete prijaviti, ker niste član ekipe." #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "Žal se ne morete prijaviti, ker niste posodobljeni član." #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_ta.utf8.po b/lang/oauth2_ta.utf8.po index 8fabf15..00904dd 100644 --- a/lang/oauth2_ta.utf8.po +++ b/lang/oauth2_ta.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_tr.utf8.po b/lang/oauth2_tr.utf8.po index 7cf59b8..ab48b57 100644 --- a/lang/oauth2_tr.utf8.po +++ b/lang/oauth2_tr.utf8.po @@ -50,7 +50,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -74,11 +74,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/oauth2_uk.utf8.po b/lang/oauth2_uk.utf8.po index c9aeabf..2b46a18 100644 --- a/lang/oauth2_uk.utf8.po +++ b/lang/oauth2_uk.utf8.po @@ -51,7 +51,7 @@ msgstr "" #: ../lib/GaletteOAuth2/Controllers/LoginController.php:260 #, php-format -msgid "Sign in %s" +msgid "Sign in to %s" msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:69 @@ -75,11 +75,11 @@ msgid "Sorry, you can't login. Please, add an email address to your account." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:143 -msgid "Sorry, you can't login because your are not a team member." +msgid "Sorry, you can't login because you are not a team member." msgstr "" #: ../lib/GaletteOAuth2/Authorization/UserHelper.php:151 -msgid "Sorry, you can't login because your are not an up-to-date member." +msgid "Sorry, you can't login because you are not an up-to-date member." msgstr "" #: ../lib/GaletteOAuth2/Repositories/ScopeRepository.php:32 diff --git a/lang/sl/LC_MESSAGES/oauth2.mo b/lang/sl/LC_MESSAGES/oauth2.mo index 3b9cd25..6edd07e 100644 Binary files a/lang/sl/LC_MESSAGES/oauth2.mo and b/lang/sl/LC_MESSAGES/oauth2.mo differ diff --git a/lib/GaletteOAuth2/Authorization/UserHelper.php b/lib/GaletteOAuth2/Authorization/UserHelper.php index 301ae45..89096bf 100644 --- a/lib/GaletteOAuth2/Authorization/UserHelper.php +++ b/lib/GaletteOAuth2/Authorization/UserHelper.php @@ -142,7 +142,7 @@ public function getUserData(int $id, string $acl, array $scopes, bool $legacy = if ($acl === self::AUTH_TEAMONLY) { if (!$member->isAdmin() && !$member->isStaff() && !$member->isGroupManager(null)) { throw new UserAuthorizationException( - _T("Sorry, you can't login because your are not a team member.", 'oauth2') + _T("Sorry, you can't login because you are not a team member.", 'oauth2') ); } } @@ -150,7 +150,7 @@ public function getUserData(int $id, string $acl, array $scopes, bool $legacy = if ($acl === self::AUTH_UPTODATE) { if (!$member->isUp2Date()) { throw new UserAuthorizationException( - _T("Sorry, you can't login because your are not an up-to-date member.", 'oauth2') + _T("Sorry, you can't login because you are not an up-to-date member.", 'oauth2') ); } } diff --git a/lib/GaletteOAuth2/Controllers/AuthorizationController.php b/lib/GaletteOAuth2/Controllers/AuthorizationController.php index 0e7714d..fcb6529 100755 --- a/lib/GaletteOAuth2/Controllers/AuthorizationController.php +++ b/lib/GaletteOAuth2/Controllers/AuthorizationController.php @@ -85,6 +85,8 @@ public function authorize(Request $request, Response $response): Response|Respon $queryParams['scope'] ?? [], true ); + //unknown scopes, from a configuration typo for example, cannot be granted + $scopes = array_values(array_intersect($scopes, array_keys(ScopeRepository::knownScopes()))); $this->view->render( $response, diff --git a/lib/GaletteOAuth2/Controllers/LoginController.php b/lib/GaletteOAuth2/Controllers/LoginController.php index 2b40907..85c158d 100755 --- a/lib/GaletteOAuth2/Controllers/LoginController.php +++ b/lib/GaletteOAuth2/Controllers/LoginController.php @@ -272,7 +272,7 @@ private function prepareVarsForm(Request $request): ?array ); $application = $this->config->get("{$client_id}.title", ''); $page_title = sprintf( - _T('Sign in %s', 'oauth2'), + _T('Sign in to %s', 'oauth2'), $application ); diff --git a/lib/GaletteOAuth2/Repositories/ScopeRepository.php b/lib/GaletteOAuth2/Repositories/ScopeRepository.php index e432298..87174db 100755 --- a/lib/GaletteOAuth2/Repositories/ScopeRepository.php +++ b/lib/GaletteOAuth2/Repositories/ScopeRepository.php @@ -35,7 +35,7 @@ public static function knownScopes(): array { return [ 'member' => [ - 'description' => _T('Access to your member basic information: name, login, email, language, company name)', 'oauth2'), + 'description' => _T('Access to your member basic information: name, login, email, language, status', 'oauth2'), ], 'member:personal' => [ 'description' => _T('Access to more precise personal data: birth date, job, gender, birth place, GnuPG ID', 'oauth2'), @@ -44,7 +44,7 @@ public static function knownScopes(): array 'description' => _T('Access to your localization data: zipcode, town, region, country', 'oauth2'), ], 'member:localization:precise' => [ - 'description' => _T('Access to your precise localisation data: full address, coordinates (from maps plugin)', 'oauth2'), + 'description' => _T('Access to your precise localization data: full address', 'oauth2'), ], 'member:phones' => [ 'description' => _T('Access to your phone numbers', 'oauth2'), diff --git a/templates/default/oauth2_authorize.html.twig b/templates/default/oauth2_authorize.html.twig index 1bea91e..d58dfc4 100755 --- a/templates/default/oauth2_authorize.html.twig +++ b/templates/default/oauth2_authorize.html.twig @@ -9,32 +9,38 @@ {% set ext_auth = true %} {% block content %}
-
+
+ {{ page_title }} {% for requested_scope in requested_scopes %} -
-
- - -
+
+ {% if requested_scope == 'member' %} + {# default scope is always given, server side #} +
+ +
+

{{ _T('Default scope is mandatory and cannot be unselected', 'oauth2') }}

+ {% else %} +
+ + +
+ {% endif %} +
{% endfor %} -
- +
-
-
- -
-
- -
-
+
+
+ +
+
+
+
{% endblock %} diff --git a/tests/GaletteOAuth2/Authorization/tests/units/UserHelper.php b/tests/GaletteOAuth2/Authorization/tests/units/UserHelper.php index bea5cf0..770d453 100644 --- a/tests/GaletteOAuth2/Authorization/tests/units/UserHelper.php +++ b/tests/GaletteOAuth2/Authorization/tests/units/UserHelper.php @@ -286,7 +286,7 @@ public function testRequireAdmin() { $adh1 = $this->getMemberOne(); - $this->expectExceptionMessage("Sorry, you can't login because your are not a team member."); + $this->expectExceptionMessage("Sorry, you can't login because you are not a team member."); $this->container->get(\GaletteOAuth2\Authorization\UserHelper::class)->getUserData( $adh1->id, \GaletteOAuth2\Authorization\UserHelper::AUTH_TEAMONLY, @@ -428,7 +428,7 @@ public function testMemberNotUp2Date(): void $this->assertTrue($store); $this->login->logout(); - $this->expectExceptionMessage("Sorry, you can't login because your are not an up-to-date member."); + $this->expectExceptionMessage("Sorry, you can't login because you are not an up-to-date member."); $this->container->get(\GaletteOAuth2\Authorization\UserHelper::class)->getUserData( $adh->id, \GaletteOAuth2\Authorization\UserHelper::AUTH_UPTODATE, diff --git a/tests/GaletteOAuth2/Controllers/tests/units/AuthorizationCodeFlow.php b/tests/GaletteOAuth2/Controllers/tests/units/AuthorizationCodeFlow.php index dc4118c..3bc59ad 100644 --- a/tests/GaletteOAuth2/Controllers/tests/units/AuthorizationCodeFlow.php +++ b/tests/GaletteOAuth2/Controllers/tests/units/AuthorizationCodeFlow.php @@ -280,12 +280,12 @@ public function testUserDataRequiresAuthorization(): void $this->assertSame('application/json', $test_response->getHeaderLine('Content-Type')); $body = json_decode((string)$test_response->getBody(), true); $this->assertSame( - "Sorry, you can't login because your are not a team member.", + "Sorry, you can't login because you are not a team member.", $body['message'] ); $this->expectLogEntry( \Analog\Analog::ERROR, - "api/user() error : Sorry, you can't login because your are not a team member." + "api/user() error : Sorry, you can't login because you are not a team member." ); } } diff --git a/tests/GaletteOAuth2/Controllers/tests/units/AuthorizationController.php b/tests/GaletteOAuth2/Controllers/tests/units/AuthorizationController.php index c2737fb..fb9892b 100644 --- a/tests/GaletteOAuth2/Controllers/tests/units/AuthorizationController.php +++ b/tests/GaletteOAuth2/Controllers/tests/units/AuthorizationController.php @@ -99,10 +99,45 @@ public function testAuthorize(): void $test_response = $this->app->handle($request); $this->expectOK($test_response); + $body = (string)$test_response->getBody(); $this->assertStringContainsString( 'Forum Flarum is requesting access to the following details', - (string)$test_response->getBody() + $body ); + $this->assertStringContainsString( + 'Forum Flarum is requesting access to the following details', + $body + ); + //default scope cannot be unchecked, and is explained + $this->assertStringContainsString( + '', + $body + ); + $this->assertStringContainsString('id="scope_member_help"', $body); + $this->assertStringNotContainsString('name="scopes[]" value="member"', $body); + } + + /** + * Test authorization form only offers known scopes + * + * @return void + */ + public function testAuthorizeWithUnknownConfiguredScope(): void + { + $this->logUserIn('galette_typo'); + + $params = $this->getAuthorizeParams('http://localhost/typo'); + $params['client_id'] = 'galette_typo'; + $request = $this->createRequest( + route_name: OAUTH2_PREFIX . '_authorize', + query_params: $params + ); + $test_response = $this->app->handle($request); + + $this->expectOK($test_response); + $body = (string)$test_response->getBody(); + $this->assertStringContainsString('value="member:phones"', $body); + $this->assertStringNotContainsString('value="member:phone"', $body); } /** diff --git a/tests/GaletteOAuth2/Controllers/tests/units/LoginController.php b/tests/GaletteOAuth2/Controllers/tests/units/LoginController.php index 8fa3444..8759b8a 100644 --- a/tests/GaletteOAuth2/Controllers/tests/units/LoginController.php +++ b/tests/GaletteOAuth2/Controllers/tests/units/LoginController.php @@ -83,7 +83,7 @@ public function testLogin(): void $test_response = $this->app->handle($request); $this->expectOK($test_response); $body = (string)$test_response->getBody(); - $this->assertStringContainsString('Sign in Forum Flarum', $body); + $this->assertStringContainsString('Sign in to Forum Flarum', $body); } /** diff --git a/tests/config/config.yml b/tests/config/config.yml index 7e20130..641636e 100644 --- a/tests/config/config.yml +++ b/tests/config/config.yml @@ -43,3 +43,11 @@ galette_defaultpassword: password: abc123 title: Client with default password redirect_uri: 'http://localhost/defaultpassword' +galette_typo: + password: typo-secret-for-tests + title: Client with a scope typo + redirect_uri: 'http://localhost/typo' + authorize: teamonly + scopes: + - member:phones + - member:phone