- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 05:09 AM
How can I control that specific users with specific roles will see specific buttons and for specific states some button will appear and some not
<div>
<div class="dropdown" id="child-case-tabs" ng-if="data.showActions">
<button type="button" id="actions-button" class="btn btn-default dropdown-toggle action-btn" data-toggle="dropdown" style="width : 100%" aria-haspopup="true" ng-init="setFocusOnActionButtons()">
${Actions}
<span class="fa fa-caret-down"></span>
</button>
<ul class="dropdown-menu pull-right" id="actionList">
<li ng-if="data.canResolve">
<a href="javascript:void(0)" ng-click="$event.stopPropagation();resolveIncident()">${Resolve Ticket}</a>
</li>
<li ng-if="data.canReopen">
<a href="javascript:void(0)" ng-click="$event.stopPropagation();reopenIncident()">${Reopen}</a>
</li>
<li ng-if="data.canClose">
<a href="javascript:void(0)" ng-click="$event.stopPropagation();closeIncident()">${Close}</a>
</li>
<li ng-if="data.canCancelritm">
<a href="javascript:void(0)" ng-click="$event.stopPropagation();cancelRitm()">${Cancel RITM}</a> <!-- Step 1 Create Cancel Option---->
</li>
<li ng-if="data.canCancelReq">
<a href="javascript:void(0)" ng-click="$event.stopPropagation();cancelReq()">${Request To Cancel}</a> <!-- Step 1 Create Cancel Option---->
</li>
</ul>
</div>
</div>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 05:31 AM
Hi @Alon Grod ,
You can set the flag true false in ng-if condition. For setting flag you can set variable in server script using gs.hasRole('role you want to give access').
Please check and Mark Helpful and Correct if it really helps you.
Regards,
Mayur Shardul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-21-2023 05:31 AM
Hi @Alon Grod ,
You can set the flag true false in ng-if condition. For setting flag you can set variable in server script using gs.hasRole('role you want to give access').
Please check and Mark Helpful and Correct if it really helps you.
Regards,
Mayur Shardul