-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/connection tab #52
base: develop
Are you sure you want to change the base?
Conversation
Hello, thanks for the PR. Anyways, please rebase your branch on develop, new features should not reach master (only bugfixes until a new version is released). Once rebased, I'm not very fan of the password verification as displayed (I know this is something quite complicated). Finally, you have many CS issues that must be fixed ;) |
app/Controllers/Admin.php
Outdated
$_SESSION['reference']['status_page_admin'] = $args['status']; | ||
|
||
//check for refences presence | ||
$dyn_refs = $this->container->project->getDynamicReferences(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This whole part is now repeated several times; this should be factorized
app/Controllers/Reference.php
Outdated
@@ -65,7 +65,7 @@ function ($key) use ($join_table) { | |||
) | |||
) | |||
); | |||
$model->where('is_displayed', '=', true); | |||
$model->where('status', '=', '2'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use raw values like "2"; use a (class) constant instead.
app/Controllers/Reference.php
Outdated
@@ -140,6 +146,8 @@ public function register(Request $req, Response $res) | |||
); | |||
} | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop those empty lines
public/index.php
Outdated
//Reference registration | ||
$app->post('/reference', 'GLPI\Telemetry\Controllers\Reference:register') | ||
->add($recaptcha) | ||
//->add($recaptcha) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should not be commented
public/js/admin_action.js
Outdated
|
||
|
||
function renderSubmitButtonAdminActionForm(){ | ||
ck1 = document.getElementById('checkboxAdminActionForm1') ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use jquery methods instead of raw javascript (for the whole file, not only this line)
app/Models/Reference.php
Outdated
public function statusIntToText($status) | ||
{ | ||
switch($status){ | ||
case "0" : return "denied"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use constants here as well
app/Project.php
Outdated
@@ -107,6 +137,26 @@ public function setConfig($config) | |||
$this->enable_contact = (bool)$config['enable_contact']; | |||
} | |||
|
|||
if (isset($config['enable_connection'])) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not thing we have to add so much configuration parameters. Why would we activate user profile without connection? Or without admin?
I guess a single configuration parameter to enable profiles creation should activate profile, connection, admin, ... Another parameter for registration may have sense.
New features :
|
Pages ajoutées :






- Inscription
- Connexion
- Profil
- Administration
Possibilités :
- S’inscrire
- Se connecter
Une fois connecté je peux :


- Ajouter une référence via la page « References »
- Consulter mes informations personnelles via la page « Profile »
- Consulter mes références, voir leurs états, les éditer ou les supprimer via la page « Profile »
- Éditer mon profile via la page « Profile »
En tant qu’administrateur je peux :

- Gérer l’état de toutes les références via la page « Admin »
- Lorsque je change l’état d’une référence j’ai le choix entre plusieurs emails : celui de la référence, celui de l’utilisateur si il y en a un de rattaché ou un personnalisé. Je peux également écrire un message personnalisé qui sera joint au mail envoyé automatiquement.
Comportement des références :
Trois états sont possibles :
- Denied (Refusé)
- Pending (En attente)
- Accepted (Accepté)
A la création d’une référence, celle-ci aura par défaut l’état « Pending ». Seulement un administrateur peut changer cet état.
Au changement d’état un email sera envoyé automatiquement à une des adresses emails spécifiées. Soit celle de l’utilisateur rattaché à la référence, soit celle de la référence ou encore une adresse rentrée manuellement par l’administrateur.
Peut importe l’état dans lequel se trouve votre référence vous avez la possibilité de l’éditer. En revanche une édition fera passer votre référence de son état actuel à « Pending ».
Peut importe l’état dans lequel se trouve votre référence vous avez la possibilité de la supprimer.
Seule les références avec un état « Accepted » seront prises en compte dans la page de visualisation de toutes les références : page « References ».