Project

General

Profile

Segnalazione #862

form/view di login

Added by Elena Grandi almost 5 years ago. Updated over 4 years ago.

Status:
Chiuso
Priority:
Normale
Assignee:
Start date:
06/28/2019
Due date:
% Done:

100%

Estimated time:
Resolution:

Description

Creare una view per il login, inizialmente senza funzionalità backend.

In secondo tempo, aggiungere la funzionalità backend relativa (questa seconda parte dopo #856)


Related issues

Related to fuss-manager - Segnalazione #909: Impostare la directory di destinazione per i dati di sessioneNuovo09/30/2019

Actions
Related to fuss-manager - Segnalazione #856: interfaccia con LDAP asincrona per tornadoChiuso06/28/2019

Actions
Related to fuss-manager - Segnalazione #860: inserire nome utente e permessi attivi all'interno dell'HTML nel template di baseChiuso06/28/2019

Actions
Related to fuss-manager - Segnalazione #863: Aggiungere permission checking a operation e APIChiuso06/28/2019

Actions

Associated revisions

Revision a647ccd6 (diff)
Added by Mark Caglienzi almost 5 years ago

Add login.html template. refs #862

Revision 88b4acd3 (diff)
Added by Mark Caglienzi almost 5 years ago

Add Login view, using the new template. refs #862

Revision 8469637f (diff)
Added by Mark Caglienzi almost 5 years ago

Add the /login url, using the new Login view. refs #862

Revision afed740a (diff)
Added by Mark Caglienzi almost 5 years ago

Show the Login link in the main navbar. refs #862

Revision 89e932d6
Added by Enrico Zini almost 5 years ago

Merge with t856 to try using it as the login backend. refs: #862

Revision 1b8b33ff (diff)
Added by Enrico Zini almost 5 years ago

Drafted initial post method for login. refs: #862

Revision ccb43a81
Added by Enrico Zini almost 5 years ago

Updated merge of t856. refs: #862

Revision 805ec6d6
Added by Enrico Zini over 4 years ago

Sync with master. refs: #862

Revision 4be0daa8 (diff)
Added by Enrico Zini over 4 years ago

Added an initial session manager implementation. refs: #862

Revision d5d3991b (diff)
Added by Enrico Zini over 4 years ago

Deal with the default of web_session_dir being None. refs: #862

Revision 92bd1fac (diff)
Added by Enrico Zini over 4 years ago

Added an async init method to Manager and Application. refs: #862

Revision 55780f99 (diff)
Added by Enrico Zini over 4 years ago

Removed jessie workaround for AsyncTestCase, and switch to async/await. refs: #862

Revision 3cb63d35 (diff)
Added by Enrico Zini over 4 years ago

Load session and user information in views. refs: #862

Revision 2093dff2 (diff)
Added by Enrico Zini over 4 years ago

Export user information to web apis. refs: #862

Revision bd1db906 (diff)
Added by Enrico Zini over 4 years ago

user -> current_user as standardized in tornado. refs: #862

Revision 86ac5124 (diff)
Added by Enrico Zini over 4 years ago

Added an AsyncHTTPClientWithCookies wrapper to AsyncHTTPClient for testing. refs: #862

Revision 7258bc7a (diff)
Added by Enrico Zini over 4 years ago

Use AsyncHTTPClientWithCookies for testing instead of setting session id cookie manually in headers. refs: #862

Revision b9f050f0 (diff)
Added by Enrico Zini over 4 years ago

Enable XSRF protection. refs: #862

Revision 62c6561b (diff)
Added by Enrico Zini over 4 years ago

Fix tests that require HTTP POSTs protected by XSRF protection. refs: #862

Revision 0bddaa3e (diff)
Added by Enrico Zini over 4 years ago

Get XSRF token in base template, and and send it in POST requests. refs: #862

History

#1

Updated by Mark Caglienzi almost 5 years ago

  • Status changed from Nuovo to In elaborazione
#2

Updated by Mark Caglienzi almost 5 years ago

#3

Updated by Mark Caglienzi almost 5 years ago

  • Status changed from In elaborazione to Commenti
  • Assignee changed from Mark Caglienzi to Enrico Zini

Aggiunta la pagina di login con un form e un link nella navbar.

Non c'è nessun backend per ora ovviamente, ma solo un <form> con gli input e il pulsante di submit, che al momento non fanno nulla.

Non ci sono nemmeno, al momento, i link per resettare la password o cambiarla (ci vorrà il backend anche per queste funzioni).

Branch t862 non mergiato in master

#4

Updated by Enrico Zini almost 5 years ago

Ho implementato un primo backend basato sul mio primo draft di #856

#5

Updated by Enrico Zini almost 5 years ago

  • Assignee changed from Enrico Zini to Mark Caglienzi

Il passo successivo è scrivere un semplice session manager, generare un cookie di sessione alla post del login, associarlo all'utente nel backend, e in tutte le altre view vedere se c'è il cookie.

Un primo semplice session manager può essere una directory di file json il cui nome è il nome del cookie.

Giro il ticket per poter continuare lo sviluppo se io non sono disponibile.

#6

Updated by Mark Caglienzi almost 5 years ago

  • Status changed from Commenti to In elaborazione
#7

Updated by Elena Grandi almost 5 years ago

#8

Updated by Enrico Zini over 4 years ago

  • Status changed from In elaborazione to Commenti
  • Assignee changed from Mark Caglienzi to Elena Grandi

Ho implementation un session manager manager/web/session.py con un'implementazione in RAM che non richiede configurazione, e una su filesystem che richiede di settare Config.web_session_dir.

La chiave di sessione viene gestita in un cookie chiamato sid.

L'oggetto User viene serializzato e salvato nella sessione dopo un'autenticazione effettuata con successo.

L'oggetto User e l'oggetto Session sono esportati in tutti i RequestHandler, e l'oggetto User viene passato a tutte le funzioni di web API.

Mentre sistemavo i test di queste funzioni, sono partito con fix a cascata che hanno portato al porting a async/await dei vari unit test, con rimozione dell'AsyncTestCase di workaround in tests/common.py

Riassegno per verifica e possibilmente merge in master.

Quello che manca, e che credo esuli da questo ticket, è mostrare il nome utente corrente nel master template, e fare effettivamente autorizzazione in base ai permessi utente.

#9

Updated by Elena Grandi over 4 years ago

  • Related to Segnalazione #909: Impostare la directory di destinazione per i dati di sessione added
#10

Updated by Elena Grandi over 4 years ago

  • % Done changed from 0 to 100

Mergiata in master.

Confermo che per il nome utente nell'interfaccia c'è #860, mentre per il check dei permessi c'è #863.

Qui intanto cerco di chiudere (redmine permettendo).

#11

Updated by Elena Grandi over 4 years ago

#12

Updated by Elena Grandi over 4 years ago

#13

Updated by Elena Grandi over 4 years ago

  • Status changed from Commenti to Chiuso
#14

Updated by Elena Grandi over 4 years ago

  • Assignee changed from Elena Grandi to Enrico Zini
#15

Updated by Elena Grandi over 4 years ago

  • Related to Segnalazione #860: inserire nome utente e permessi attivi all'interno dell'HTML nel template di base added
#16

Updated by Elena Grandi over 4 years ago

  • Blocks deleted (Segnalazione #863: Aggiungere permission checking a operation e API)
#17

Updated by Elena Grandi over 4 years ago

  • Related to Segnalazione #863: Aggiungere permission checking a operation e API added
#18

Updated by Elena Grandi over 4 years ago

  • Status changed from Chiuso to In elaborazione

riapro per parti mancanti (ma ho tolto il blocco su #863, dato che ora c'è sufficiente materiale per lavorarci)

#19

Updated by Enrico Zini over 4 years ago

  • Status changed from In elaborazione to Chiuso
  • Assignee changed from Enrico Zini to Elena Grandi

Ho implementato la parte di XSRF protection che mancava, mergiato in master, chiudo.

Also available in: Atom PDF