Update secure-data.md (#8525)

Fixes #8502
pull/8532/head
Rick Anderson 2018-09-13 19:27:11 -07:00 committed by GitHub
parent c07e6f1c0a
commit c993428091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -264,9 +264,12 @@ Update the details page model:
[!code-csharp[](secure-data/samples/final2.1/Pages/Contacts/Details.cshtml.cs?name=snippet)]
## Add a user to a role
## Add or remove a user to a role
Roles are stored in the Identity cookie. Changes made to user roles are not persisted to the cookie until the cookie is regenerated or the user signs out and signs in. Applications that add users to a role should call `SignInManager.RefreshSignInAsync(user)` to update the cookie.
See [this issue](https://github.com/aspnet/Docs/issues/8502) for information on:
* Removing privileges from a user. For example muting a user in a chat app.
* Adding privileges to a user.
## Test the completed app