The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How can I control the visibility of the button in Incident Standard Ticket Actions

Alon Grod
Tera Expert

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&colon;void(0)" ng-click="$event.stopPropagation();resolveIncident()">${Resolve Ticket}</a>
            </li>
            <li ng-if="data.canReopen">
                <a href="javascript&colon;void(0)" ng-click="$event.stopPropagation();reopenIncident()">${Reopen}</a>
            </li>
            <li ng-if="data.canClose">
                <a href="javascript&colon;void(0)" ng-click="$event.stopPropagation();closeIncident()">${Close}</a>
            </li>
          
          <li ng-if="data.canCancelritm">
                <a href="javascript&colon;void(0)" ng-click="$event.stopPropagation();cancelRitm()">${Cancel RITM}</a> <!-- Step 1 Create Cancel Option---->
            </li>
          
          <li ng-if="data.canCancelReq">
                <a href="javascript&colon;void(0)" ng-click="$event.stopPropagation();cancelReq()">${Request To Cancel}</a> <!-- Step 1 Create Cancel Option---->
            </li>
        </ul>
    </div>
  
</div>
1 ACCEPTED SOLUTION

Mayur2109
Kilo Sage
Kilo Sage

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

View solution in original post

1 REPLY 1

Mayur2109
Kilo Sage
Kilo Sage

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