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
diff --git a/conf/index_source.php b/conf/index_source.php
index 195bd36..587c8d5 100644
--- a/conf/index_source.php
+++ b/conf/index_source.php
@@ -19,9 +19,7 @@
EmailPoubelle
-
- = _('Emails trash free') ?>
- = _('Generate trash emails without lifetime constraint') ?>.
+
diff --git a/manifest.json b/manifest.json
index 8834d54..d5a062a 100644
--- a/manifest.json
+++ b/manifest.json
@@ -53,6 +53,15 @@
},
"example": "homer"
},
+ {
+ "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",
"ask": {
@@ -62,8 +71,6 @@
"choices": ["Yes", "No"],
"default": "No"
}
-
-
]
}
}
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
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