Open jterps08 opened 7 years ago
I thought that Habibillah had built this, but I guess the logic got screwed up when we moved to API v2... All users in an AU or EU country (e.g. Nigeria or France), should be linked to their town group, their state group, and their country group in addition to the AU group or EU group.
@jterps08 the problem here is all these groups (eu/afu country's groups) should have a parent group (eu/afu), but there is no one. Should add it in admin dashboard.
@igaponov just to make sure we're aligned...
Someone living in Nairobi, Kenya should be linked to Nairobi, Nairobi province (whatever it is), Kenya, and AU group. Someone living in Paris, France should be linked to Paris, Paris province (whatever it is), France, and EU group.
I do not have ability to add this parent group to admin dashboard - I am assuming action is still on backend?
@jterps08 there is a code on backend:
if (!is_null($parentCountryGroup) &&
($parentCountryGroup->getLocationName() == Group::GROUP_LOCATION_NAME_EROPEAN_UNION
|| $parentCountryGroup->getLocationName() == Group::GROUP_LOCATION_NAME_AFRICAN_UNION)) {
$this->joinToGroup($user, $parentCountryGroup);
}
that means there must be a group (EU
or AFU
) and country group have to have one of these groups as a parent, so user can join it. Now there is no EU
and AFU
groups on prod and no one country group has a parent one.
@jterps08 I suppose we add country groups automatically if it doesn't exists, so EU
and AFU
groups should be created automatically too. So we can do next:
I trust your judgment @igaponov - I just want to make sure the linkage to AU and EU happens accurately without changing the rest of the system.
@jterps08 AU is a code of Australia, that's why AFU
was used before for African Union
sounds good. Thanks @igaponov
I changed the address of zxc3 to a Nigerian Address and then a German address... I would have expected the user to be auto-linked to African Union (AU) and European Union (EU) group, but did not see it.
https://github.com/PowerlineApp/powerline-server/issues/37
https://github.com/PowerlineApp/powerline-server/pull/43 https://github.com/PowerlineApp/powerline-server/pull/42 https://github.com/PowerlineApp/powerline-server/pull/41