Skip to content

Commit

Permalink
feat: add security pipes examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rombru committed Nov 21, 2022
1 parent 147854c commit 07da654
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions projects/demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,24 @@ <h1>
</ng-template>
</div>


<div>
<b>Pipe HasRoles('ADMIN', 'USER') ?</b>&nbsp;
<span>{{['USER','ADMIN'] | secuHasRoles | async}}</span>
</div>
<div>
<b>Pipe HasAnyRoles('X', 'Y', 'Z') ?</b>&nbsp;
<span>{{['X', 'Y', 'Z'] | secuHasAnyRoles | async}}</span>
</div>
<div>
<b>Pipe IsMemberOf('GROUP_A') ?</b>&nbsp;
<span>{{['GROUP_A'] | secuIsMemberOf | async}}</span>
</div>
<div>
<b>Pipe HasPermission('simple') ?</b>&nbsp;
<span>{{['simple'] | secuHasPermissions | async}}</span>
</div>
<div>
<b>Pipe HasPermission('foo', {{'{'}}foo: {{foo.value}}{{'}'}}) ?</b>&nbsp;
<span>{{'foo' | secuHasPermissions:foo | async}}</span>
</div>

0 comments on commit 07da654

Please sign in to comment.