Skip to content

Instantly share code, notes, and snippets.

@stalniy
Created July 17, 2018 10:51
Show Gist options
  • Save stalniy/4023b79232652f489a0d45c3decb4380 to your computer and use it in GitHub Desktop.
Save stalniy/4023b79232652f489a0d45c3decb4380 to your computer and use it in GitHub Desktop.
Angular wrong permission management
<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