Created
July 17, 2018 10:51
-
-
Save stalniy/4023b79232652f489a0d45c3decb4380 to your computer and use it in GitHub Desktop.
Angular wrong permission management
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div *ngIf="loggedInUser.role === ADMIN || user.auth && post.author === loggedInUser.id"> | |
<button (click)="deletePost()">Delete</button> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment