Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Add a method to remove every principals #645

Merged
merged 3 commits into from
Feb 10, 2016
Merged

Conversation

leplatrem
Copy link
Contributor

There was no way to delete a principal from every users.

Here it is.

It will be useful in Kinto when a group is deleted.

@Natim r?

with self._client.pipeline() as pipe:
user_keys = self._client.scan_iter(match='user:*')
for user_key in user_keys:
self._client.srem(user_key, principal)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are not using the pipe here.

@Natim
Copy link
Contributor

Natim commented Feb 9, 2016

r+wc

leplatrem added a commit that referenced this pull request Feb 10, 2016
@leplatrem leplatrem merged commit df939be into master Feb 10, 2016
@leplatrem leplatrem deleted the add_remove_all_principals branch February 10, 2016 12:10
leplatrem pushed a commit that referenced this pull request Feb 15, 2016
@leplatrem leplatrem self-assigned this Feb 15, 2016
almet added a commit that referenced this pull request Feb 16, 2016
@leplatrem leplatrem modified the milestone: 3.0.0 Feb 29, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants