Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support blocking user accounts #614

Merged
merged 4 commits into from
Jan 25, 2017
Merged

Support blocking user accounts #614

merged 4 commits into from
Jan 25, 2017

Conversation

tsauerwein
Copy link
Member

@tsauerwein tsauerwein commented Jan 25, 2017

Related to #484

Requires c2corg/pydiscourse#1

Copy link
Member

@asaunier asaunier left a comment

Choose a reason for hiding this comment

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

Minor typos else LGTM!


self.assertFalse(self.is_blocked(self.contributor.id))

def test_follow_invalid_user_id(self):
Copy link
Member

Choose a reason for hiding this comment

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

Do you mean test_unblock_invalid_user_id?

super(TestUserBlockedRest, self).setUp()
self._prefix = '/users/blocked'

def test_follow_unauthorized(self):
Copy link
Member

Choose a reason for hiding this comment

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

test_blocked_unauthorized

errors = body.get('errors')
self.assertIsNotNone(self.get_error(errors, 'id'))

def test_following_wrong_user_id(self):
Copy link
Member

Choose a reason for hiding this comment

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

test_blocked_wrong_user_id

super(TestUserBlockedAllRest, self).setUp()
self._prefix = '/users/blocked'

def test_follow_unauthenticated(self):
Copy link
Member

Choose a reason for hiding this comment

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

test_blocked_unauthenticated

@tsauerwein tsauerwein merged commit 1fa4744 into master Jan 25, 2017
@tsauerwein tsauerwein deleted the block-account branch January 25, 2017 15:37
@tsauerwein
Copy link
Member Author

Thanks for the review.

@asaunier
Copy link
Member

First PR with an Alembic job to run in demo/prod :P

@tsauerwein
Copy link
Member Author

First PR with an Alembic job to run in demo/prod :P

Yes! I think in our current upgrade demo/prod procedure we are not yet running an Alembic upgrade. But this should not be a problem, @arnaud-morvan?

@asaunier
Copy link
Member

The wiki explains how to make an alembic upgrade in the demo:
https://github.com/c2corg/v6_api/wiki/Upgrade-the-exoscale-demo-server

docker-compose run --rm api .build/venv/bin/alembic upgrade head

No mention in the prod upgrade howto but I guess it's the same?
https://github.com/c2corg/v6_api/wiki/Upgrade-the-prod-server

For a dev env, I guess one should simply run

.build/venv/bin/alembic upgrade head

as explained at https://github.com/c2corg/v6_api/tree/master/alembic_migration#run-a-migration
Right?

@arnaud-morvan
Copy link
Member

I've added the alembic migration to prod upgrade wiki page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants