@javierbq found that my previous pull request (#78) had a bug--as it doesn't sync groups, if a user logs into the Django site after the sync, their group memberships are deleted from Stormpath. This PR fixes that bug by also syncing groups from stormpath to the local database. A flag is added to the renamed function (models.StormpathUserManager.sync_accounts() -> models.StormpathUserManager.sync_accounts_from_stormpath()) called _syncgroups who's default value is True. Currently this flag is not settable from the management command, since the result of not setting it to False is very non-obvious IMO and def. Requires a big, well written warning before it is provided as a command line option to users.
Summary of changes;
more descriptive name for stormpath -> local sync method / management command
added groups to sync
fixed broken NoArgsCommand reference in management command script
@javierbq found that my previous pull request (#78) had a bug--as it doesn't sync groups, if a user logs into the Django site after the sync, their group memberships are deleted from Stormpath. This PR fixes that bug by also syncing groups from stormpath to the local database. A flag is added to the renamed function (
models.StormpathUserManager.sync_accounts()
->models.StormpathUserManager.sync_accounts_from_stormpath()
) called _syncgroups who's default value isTrue
. Currently this flag is not settable from the management command, since the result of not setting it toFalse
is very non-obvious IMO and def. Requires a big, well written warning before it is provided as a command line option to users.Summary of changes;