From b0e542c9abfae78fdd3d824d594da3d6bc66da19 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:00:27 +0100 Subject: [PATCH 01/11] Integration AdminPanel --- conf/index_source.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/conf/index_source.php b/conf/index_source.php index 195bd36..f4d5f96 100644 --- a/conf/index_source.php +++ b/conf/index_source.php @@ -19,9 +19,7 @@ EmailPoubelle
-
-

-

.

+
From 86f89537fbbdef89b51fbe49a3fce9462d9a56ad Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:05:12 +0100 Subject: [PATCH 02/11] Integration Admin Panel --- manifest.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 8834d54..c27e3f1 100644 --- a/manifest.json +++ b/manifest.json @@ -53,6 +53,14 @@ }, "example": "homer" }, + { + "password": "password", + "type": "password", + "ask": { + "en": "Enter a password to access the admin panel", + "fr": "Entrer un mot de passe pour accéder au tableau d'administration" + } + }, { "name": "public_site", "ask": { @@ -63,7 +71,6 @@ "default": "No" } - ] } } From f514c75966f966d67d78ff4416ec57b76ea621aa Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:15:10 +0100 Subject: [PATCH 03/11] Insert Admin Panel --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 92ae84d..6f97b87 100644 --- a/scripts/install +++ b/scripts/install @@ -15,6 +15,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN +password=$YNH_APP_ARG_PASSWORD is_public=$4 final_path=/var/www/$app db_user=emailPoubelle @@ -95,6 +96,7 @@ ynh_replace_string "// define('DBPASS'," " define('DBPASS'," $f ynh_replace_string "baseMysql" "$db_user" $final_path/conf.php ynh_replace_string "utilisateurMysql" "$db_user" $final_path/conf.php ynh_replace_string "motdepassedefou" "$db_pwd" $final_path/conf.php +ynh_replace_string "define('ADMIN_PASSWORD', 'admin');" "define('ADMIN_PASSWORD', '$password');" $final_path/conf.php #setting conf file not world-readable (dude, there is a plain-text password !) sudo chmod o-r $final_path/conf.php From 6e8d216dda5ce8c53daa1642383cf077244fbf32 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:15:51 +0100 Subject: [PATCH 04/11] Typo --- src/conf-dist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf-dist.php b/src/conf-dist.php index 9f0991d..46e5901 100644 --- a/src/conf-dist.php +++ b/src/conf-dist.php @@ -51,7 +51,7 @@ // Email define('EMAILTAGSUJET', '[EmailPoubelle]'); // From de l'email -define('EMAILFROM', '"NO REPLAY emailPoubelle" '); +define('EMAILFROM', '"NO REPLY emailPoubelle" '); define('EMAILEND', 'emailPoubelle.zici.fr'); // Alisas interdit : (regex ligne par ligne) - commenter pour désactiver From dd44e92ba59541b96549dc1bec53623276e507f4 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:20:05 +0100 Subject: [PATCH 05/11] Include Admin Panel --- manifest.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index c27e3f1..492c787 100644 --- a/manifest.json +++ b/manifest.json @@ -54,12 +54,13 @@ "example": "homer" }, { - "password": "password", + "name": "password", "type": "password", "ask": { "en": "Enter a password to access the admin panel", "fr": "Entrer un mot de passe pour accéder au tableau d'administration" } + "example":"AveryStrongPassword" }, { "name": "public_site", From 9bc40983c5f1c4fd0b05d1be884fb61145ee6bb6 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:21:02 +0100 Subject: [PATCH 06/11] Integration Admin Panel --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 492c787..72417bf 100644 --- a/manifest.json +++ b/manifest.json @@ -60,7 +60,7 @@ "en": "Enter a password to access the admin panel", "fr": "Entrer un mot de passe pour accéder au tableau d'administration" } - "example":"AveryStrongPassword" + "example": "AveryStrongPassword" }, { "name": "public_site", From fdc4f918b5eee751d4da58aef343885f7458d96e Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:21:55 +0100 Subject: [PATCH 07/11] Integrate admin Panel --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 72417bf..6c315bc 100644 --- a/manifest.json +++ b/manifest.json @@ -59,7 +59,7 @@ "ask": { "en": "Enter a password to access the admin panel", "fr": "Entrer un mot de passe pour accéder au tableau d'administration" - } + }, "example": "AveryStrongPassword" }, { From 44bb034625b8e08fc343e0d9fed57f6b78cf9028 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:24:48 +0100 Subject: [PATCH 08/11] Integration Admin Panel --- conf/index_source.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/index_source.php b/conf/index_source.php index f4d5f96..587c8d5 100644 --- a/conf/index_source.php +++ b/conf/index_source.php @@ -28,7 +28,7 @@ include('../conf-dist.php'); } include('../emailPoubelle.php'); - include('../emailPoubelle.phpAdmin'); + include('../emailPoubelleAdmin.php'); ?> From cc7d4192692d0ad07e1dc850d8961bf7fa816fed Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:31:58 +0100 Subject: [PATCH 09/11] Admin Panel when upgrade from 1.0 --- manifest.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 6c315bc..7d5b345 100644 --- a/manifest.json +++ b/manifest.json @@ -71,7 +71,17 @@ "choices": ["Yes", "No"], "default": "No" } - + ], + "upgrade" : [ + { + "name": "password", + "type": "password", + "ask": { + "en": "Enter a password to access the admin panel, this is required only if you upgrade from 1.0", + "fr": "Entrer un mot de passe pour accéder au tableau d'administration, ce n'est nécessaire qu'en cas d'upgrade depuis la version 1.0" + }, + "example": "AveryStrongPassword" + }, ] } } From 37d73f09a9b7571ec0661d1fccfc5d6151038903 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:45:47 +0100 Subject: [PATCH 10/11] Delete Admin password when upgrade --- manifest.json | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/manifest.json b/manifest.json index 7d5b345..d5a062a 100644 --- a/manifest.json +++ b/manifest.json @@ -71,17 +71,6 @@ "choices": ["Yes", "No"], "default": "No" } - ], - "upgrade" : [ - { - "name": "password", - "type": "password", - "ask": { - "en": "Enter a password to access the admin panel, this is required only if you upgrade from 1.0", - "fr": "Entrer un mot de passe pour accéder au tableau d'administration, ce n'est nécessaire qu'en cas d'upgrade depuis la version 1.0" - }, - "example": "AveryStrongPassword" - }, ] } } From a4f8fd435e85d2088f4a2bb756e35b3405ea1fea Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 24 Nov 2018 18:48:54 +0100 Subject: [PATCH 11/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17195b8..eb1d35c 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ TODO : [ ] Why the flag don't show?? -[ ] Implement Admin panel +[X] Implement Admin panel [ ] Add backup restore script