gina-alaska / ckanext-loopback

CKAN extension to synchronize CKAN users with a LoopBack server.
0 stars 0 forks source link

Update LoopBack when user is removed from an organization in CKAN #1

Open cstephen opened 8 years ago

cstephen commented 8 years ago

Currently, the ACE LoopBack API is updated when a CKAN user is added to an organization, but not when the user is later removed from the organization. This part of the CKAN extension has not been implemented yet because users can belong to multiple CKAN groups, but neither LoopBack nor the mobile app itself support multiple groups at this time. See ua-snap/ace-cordova-app#22.

The ACE LoopBack API currently requires users to belong to a group to be able to submit data from the mobile app. So, if there's a way to restrict (and require) CKAN users to belong to a single group, that would work as a short-term solution until multiple group support is implemented into the LoopBack and mobile app code.

cstephen commented 8 years ago

I went ahead and implemented a stopgap fix for this in 117041c. Now whenever a user is removed from an organization in CKAN, the user's group ID is set to nothing (a blank string) in LoopBack. This means if the user belongs to multiple organizations in CKAN, if the user is removed from any one of the organizations, they'll lose whatever group affiliation they had in LoopBack.

We can't do much better than this until multiple group support is added to the LoopBack configuration and ACE mobile app code.

cstephen commented 7 years ago

This issue is fixed in #4.