apinf / platform

Apinf - Open source API management platform with multi proxy and protocol support
https://apinf.com/
European Union Public License 1.1
74 stars 33 forks source link

Removal of login platform parameters partially fails #3568

Closed matleppa closed 5 years ago

matleppa commented 6 years ago

Background

It is possible to have several login methods. The logins with a confirmation of external sites need parameters to be stored in platform. The parameters are stored in two DBs, in LoginPlatforms collection (platform's own collection) and in meteor_accounts_loginserviceConfiguration (used by external package related to login functionalities).

Problem

Adding and modifying login platforms' parameter are successful, however, when a login platform's parameters are tried to remove, they are removed only from LoginPlatforms collection, not from meteor_accounts_loginserviceConfiguration collection.

Reason

When login platform parameter set is modified, there is a checking related to update of meteor_accounts_loginserviceConfiguration collection:

Solution

Expand parameter set checking such a way, that the modification is accepted in meteor_accounts_loginserviceConfiguration collection in case either of conditions is met:

This way the the collections remain at same level, when parameters are modified.

Nazarah commented 5 years ago

Done. Fixed.