i want disable the check box and icon in list view

Venkatesh7
Kilo Contributor

I want disable the check box and icon in list view any one can please tell me the solutions

Please find the below attachment 

1 ACCEPTED SOLUTION

Hi Venkatesh,

Did you use correct table while using list_edit ACL

Regards
Ankur

View solution in original post

19 REPLIES 19

Venkatesh7
Kilo Contributor

HI Ankur Bawiskar

 

Now it is working , But i need role base or group base  we want to make read only or edible

 

Thanks and Regards

Venkatesh Y

Hi Venkatesh,

you can use g_user.hasRole() in UI scripts;

if user has role as 'roleName' then it would hide

(function() {

addAfterPageLoadedEvent(function () {

// use your table name below I used u_snow_table

if(window.location.href.indexOf('u_snow_table_list') != -1){

if(g_user.hasRole('roleName')){
hideRefIcons();
hideCheckBoxes();
}
}

});
})();

function hideCheckBoxes(){

$j(".checkbox-label").each(function(){
$j(this).hide();
});
}

function hideRefIcons(){
$j('a[class="btn btn-icon table-btn-lg icon-info list_popup"').each(function() {
$j(this).css( "display", "none" );

});

Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur

Venkatesh7
Kilo Contributor

HI Ankur Bawiskar

In the list view  I need to editble and readonly for the particular role based

Please find the below attachment

Thanks and Regards

Venkatesh Y

Hi Venkatesh,

Do you want to hide the checkboxes and the icons based on role or hide it only for few set of users?

Regards
Ankur

HI 

Ankur Bawiskar

yes that is one requirement, and also I need  in the list view columns make read only or editable for limited users .

i write the acl for the list view edit that is applied  for all users , but  problem is only for  i want limited users make editable or read only.

 

 can you please help me.

 

Thanks and Regards 

Venkatesh Y.