Skip to content

Update access-control.rst#69

Open
mchesler613 wants to merge 1 commit into
agiliq:masterfrom
mchesler613:patch-3
Open

Update access-control.rst#69
mchesler613 wants to merge 1 commit into
agiliq:masterfrom
mchesler613:patch-3

Conversation

@mchesler613

Copy link
Copy Markdown

Fixed minor spelling typos and added phrases for clarity. Thanks.

Fixed minor spelling typos and added phrases for clarity.
Comment thread docs/access-control.rst
- Authenticated users can create choices only for polls they have created.
- Authenticated users can delete only polls they have created.
- Only an authenticated user can vote. Users can vote for other people's polls.
- Only an authenticated user can vote. Authenticated users can vote on other people's polls.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Only an authenticated user can vote. They can also vote on other people's polls

Comment thread docs/access-control.rst
}

Which give back this response.
Doing so gives back this response.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Which gives back this response:
or
Which returns the response below

Comment thread docs/access-control.rst
serializer_class = UserSerializer

Note the :code:`authentication_classes = ()` and :code:`permission_classes = ()` to exempt :code:`UserCreate` from global authentication scheme.
Note the :code:`authentication_classes = ()` and :code:`permission_classes = ()` statements which exempt :code:`UserCreate` from the global authentication scheme.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Revert

Comment thread docs/access-control.rst
Note the :code:`authentication_classes = ()` and :code:`permission_classes = ()` statements which exempt :code:`UserCreate` from the global authentication scheme.

We want to ensure that tokens are created when user is created in :code:`UserCreate` view, so we update the :code:`UserSerializer`. Change your :code:`serializers.py` like this
To ensure that tokens are created when a user is created in the :code:`UserCreate` view, we need to update the :code:`UserSerializer`. Edit your :code:`serializers.py` to accomodate this change.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Edit your serializers.py as explained below:

Comment thread docs/access-control.rst


POST with a incorrect username and password, and you will get a response like this, with a HTTP status of 400.
Do a POST with a incorrect username and password, and you will get a response like this, with a HTTP status of 400.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Revert and update:

POST with an incorrect username and password, and you will get a response like this, with a HTTP status of 400.

@yvsssantosh

Copy link
Copy Markdown
Collaborator

Make the changes as mentioned. And I should be able to merge this

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.

2 participants