Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Feature/connection tab #52

Open
wants to merge 70 commits into
base: develop
Choose a base branch
from

Conversation

AymLaf
Copy link

@AymLaf AymLaf commented May 22, 2018

Pages ajoutées :
image
image
- Inscription
image
- Connexion
image
- Profil
image
- Administration
image

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 »
image
- Éditer mon profile via la page « Profile »
image

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.
image

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 ».

@trasher
Copy link
Collaborator

trasher commented May 23, 2018

Hello, thanks for the PR.
Globally, this seems pretty good; I did not review nor tested yet.

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 ;)

$_SESSION['reference']['status_page_admin'] = $args['status'];

//check for refences presence
$dyn_refs = $this->container->project->getDynamicReferences();
Copy link
Collaborator

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

@@ -65,7 +65,7 @@ function ($key) use ($join_table) {
)
)
);
$model->where('is_displayed', '=', true);
$model->where('status', '=', '2');
Copy link
Collaborator

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.

@@ -140,6 +146,8 @@ public function register(Request $req, Response $res)
);
}


Copy link
Collaborator

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be commented



function renderSubmitButtonAdminActionForm(){
ck1 = document.getElementById('checkboxAdminActionForm1') ;
Copy link
Collaborator

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)

public function statusIntToText($status)
{
switch($status){
case "0" : return "denied";
Copy link
Collaborator

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'])) {
Copy link
Collaborator

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.

@AymLaf AymLaf changed the base branch from master to develop May 24, 2018 13:03
@AymLaf
Copy link
Author

AymLaf commented Jun 11, 2018

New features :

  1. Admin navbar with references and users management links
  2. Users' management view
  3. Table to personalize your filters
  4. "Plus" button next to references in references management view to :
    - view all reference's infos
    - sending mails
    - If attached to reference, view the user
  5. (Mass) actions on references and users

dropdown_ref_multi_choices

users_management

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants