Project

General

Profile

Development #8826

Refactoring: merge LibertyServiceProvider into LibertyProvider

Added by Benjamin Dauvergne about 4 years ago. Updated 5 months ago.

Status:
En cours
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
30 Oct 2015
Due date:
% Done:

0%

Patch proposed:
No
Planning:
No

Description

There is no need for two models anymore, all fields from LibertyServiceProvider could be carried by LibertyProvider.

  • First a migration should add new field to LibertyProvider mapping those of LibertyServiceProvider with null=True for those lacking it
  • Second a migration should copy all value from LibertyServiceProvider to their liberty_provider
  • Third all use of LibertyServiceProvider should be changed to use directly LibertyProvider
  • Finally the LibertyServiceProvider model should be removed

liberty_service_provider-to-service_provider-8826.patch View (16.5 KB) Josué Kouka, 11 Dec 2015 03:27 PM

0001-Model-Data-migrations-of-LibertyServiceProvider-Libe.patch View (14.8 KB) Josué Kouka, 16 Dec 2015 05:44 PM

0001-authentic2-saml-forms-remove-self.childs-there-are-n.patch View (1.72 KB) Benjamin Dauvergne, 18 Dec 2015 12:21 PM

0001-Model-Data-migrations-of-LibertyServiceProvider-Libe.patch View (20.6 KB) Josué Kouka, 21 Dec 2015 11:56 AM

0001-Model-Data-migrations-of-LibertyServiceProvider-to-L.patch View (21.3 KB) Josué Kouka, 21 Dec 2015 10:42 PM

0001-Model-Data-migrations-of-LibertyServiceProvider-to-L.patch View (21.7 KB) Josué Kouka, 21 Dec 2015 11:26 PM

0001-Model-Data-migrations-of-LibertyServiceProvider-to-L.patch View (23.2 KB) Josué Kouka, 11 Mar 2016 06:05 PM

0001-Model-Data-migrations-of-LibertyServiceProvider-to-L.patch View (23.4 KB) Josué Kouka, 16 Mar 2016 05:30 PM

0001-Model-Data-migrations-of-LibertyServiceProvider-to-L.patch View (23.4 KB) Josué Kouka, 17 Mar 2016 10:46 AM

0001-Model-Data-migrations-of-LibertyServiceProvider-to-L.patch View (23.3 KB) Josué Kouka, 17 Mar 2016 10:56 AM

0001-Model-Data-migrations-of-LibertyServiceProvider-to-L.patch View (23.2 KB) Josué Kouka, 17 Mar 2016 11:00 AM

0001-Model-Data-migrations-of-LibertyServiceProvider-to-L.patch View (24.3 KB) Josué Kouka, 05 Apr 2016 10:13 AM


Related issues

Related to Publik - Project management #10245: Gérer les autorisations de se connecter à un service dans authentic Fermé 09 Mar 2016
Related to Hobo - Bug #10466: merge des classes A2 LibertyServiceProvider et LibertyProvider En cours 29 Mar 2016

History

#1 Updated by Josué Kouka about 4 years ago

  • Status changed from Nouveau to En cours

#2 Updated by Benjamin Dauvergne about 4 years ago

  • Target version set to 2.2.0

#3 Updated by Josué Kouka about 4 years ago

#4 Updated by Benjamin Dauvergne almost 4 years ago

Je n'arrive plus à appliquer le patch sur master, pourrais-tu le rebaser ?

#5 Updated by Josué Kouka almost 4 years ago

Pour te remettre dans le contexte, l'erreur survenait dans src/authentic2/saml/models.py ligne 34. lasso.Provider

#6 Updated by Benjamin Dauvergne almost 4 years ago

Patch to remove last traces of handling of LibertyServiceProvider in authentic2/saml/forms.py, the form should be refactored as a ModelForm to remove the need to implement def save().

#8 Updated by Josué Kouka almost 4 years ago

LibertyFederation data migration added

#9 Updated by Josué Kouka almost 4 years ago

References to LibertyServiceProvider removed from common.py

#10 Updated by Josué Kouka almost 4 years ago

fix FieldError: Relation fields do not support nested lookups

#11 Updated by Benjamin Dauvergne almost 4 years ago

  • authentic2/saml/admin.py remove commented lines, move enabled up in the fieldset, rename fieldset title "SAML service provider" to "Policy"
  • authentic2/saml/forms.py there is an akward raise added before another
  • saml/management/commands/sync-metadata.py reformat the docstring et remove reference LibertyIdentityProvider in it, the expressed not options['create-disabled'] must not be removed but applied to LibertyProvider.enabled
  • src/authentic2/saml/migrations/0018_auto_20151208_1542.py you need to provied an empty backward RunPython migration like def noop(apps, schema_editor): pass, see other RunPython migrations in authentic
  • src/authentic2/saml/migrations/0020_auto_20151221_1108.py a RunPython is missing

The you will need to rebase, for testing migrations I advise loading a dump of Montpellier production database and see if it works.

#12 Updated by Benjamin Dauvergne almost 4 years ago

#13 Updated by Josué Kouka almost 4 years ago

Everything seems to be alright. Tested with 3m production db

#14 Updated by Benjamin Dauvergne over 3 years ago

the expressed not options['create-disabled'] must not be removed but applied to LibertyProvider.enabled

This request is not treated.

The noop() operation is not plugged in the RunPython action in migration 0018 and 0020.

#17 Updated by Benjamin Dauvergne over 3 years ago

Pour le RunPython, s'il te plait, lis la doc.

#19 Updated by Josué Kouka over 3 years ago

Benjamin Dauvergne a écrit :

Pour le RunPython, s'il te plait, lis la doc.

Ah oui, c'est

RunPython(FowardFunc, RewardFun)

#21 Updated by Benjamin Dauvergne over 3 years ago

Il faudrait modifier aussi la commande hobo/agent/authentic2/management/commands/hobo_deploy.py, il y a aussi des mentions de LibertyServiceProvider dans le dépôt authentic2-pratic.git. J'ai fait un grep sur tous les repos je n'en vois pas d'autres (il y a en dans portial-citoyen.git mais ce projet est mort).

#22 Updated by Josué Kouka over 3 years ago

  • Related to Bug #10466: merge des classes A2 LibertyServiceProvider et LibertyProvider added

#23 Updated by Josué Kouka over 3 years ago

Ajout de la gestion de dépendances avec hobo pour authentic2-multitenant

#24 Updated by Benjamin Dauvergne about 2 years ago

  • Patch proposed changed from Yes to No

Ce serait vraiment sympa d'intégrer ça à un moment, mais faut rebaser je pense.

#25 Updated by Frédéric Péters 5 months ago

  • Assignee deleted (Josué Kouka)

Also available in: Atom PDF