I think I can imagine why this might be the case, but a customer just asked about this. He would like to be able to remove custom Lists from a module's Shared Lists display, even though he (the main admin user) didn't create them.
I can see his point... What if a load of lists are created by users and then those users leave the comany so they are now inactive or deleted? How can an admin then "clean up" the Lists?
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
This is coming up as an issue again and again from customers now. They (admins) can't even see who created each list, let alone edit or delete them. Another customer mentioned the key metrics widget on the dashboard which I think is also related to this:
"How do you clean up the key indicators on the dashboard? several users have created and shared their personal lists in the key indicators and I can't figure out how to modify or un-share them as admin. Do the users themselves have to do the modifications?"
Admin needs to have the ability to edit / modify lists. It appears that we can modify lists we've created, but not all the rest. Is this a glitch or are we missing something?
Alan LordTitle changed from Admins can't removed Lists from Shared Lists. to Admins can't remove/edit Lists from Shared Lists.
Title changed from Admins can't removed Lists from Shared Lists. to Admins can't remove/edit Lists from Shared Lists.
@prasad And another one. I really think admin level users need to be able to edit/delete/manage all users' lists. I appreciate it might cause problems if the list owner uses a list as their default or has it on a dashboard etc... But surely that could be handled somehow?
@lord_alan We have analyzed this case on user deletion, On which we are transferring ownership to selected user.
Following are the list of actions performed on user deletion.
All assigned records of deleted user, is re assigned to transfer user-id (i.e., vtiger_crmentity)
All the filters created by deleted user smownerid is set to transfer user-id (i.e., vtiger_customview)
The entries in shared filter list is been deleted, if user is deleted from in-active list (i.e., vtiger_cv2users)
These actions are performed by vtws_transferOwnership api() (include/Webservices/Utils.php) See
So i think on deletion of user, If transfer owner is choosed as admin user then he will have the ability to delete/edit and modify the filter without any hassle.
@uma.s This isn't ONLY about deleted users. I have customers with (literally) hundreds of filters on multiple modules and they need to be able to clean them up. Often the user is not deleted; they have left the company or moved on, and maybe the user is made inactive or not. As an admin you can't even tell which user a filter belongs to - so how are you supposed to be able clean the lists up?
Oddly - I have been working on this this morning - because I have a customer who is getting very frustrated by this problem and has decided to have the code modified. I am adjusting the SideBarEssentials template(s) and the ListSidebar.js code so that if a user is an admin user, then the edit and delete popup options can be viewed and used. The code to delete or edit a list in the Custom_View_Record class appears to cater for this and the in the methods to test for isEditable or isDeletable they return true if you are an admin user anyway.
then modified the ListSidebar_Js class. Hint I think there's a design flaw in your code which took me a while to track down. You load the var contentEle only once and if the first entry in the list is "All" you completely remove the editFilter and deleteFilter li tags. I had to put them back in...
if (!jQuery(ele).data('editable')){contentEle.find('.editFilter').remove();// This propogates to the next iteration of the each() method; removing the entire li}else{contentEle.find('ul').append(editEle);// Add back if missingcontentEle.find('.editFilter').removeClass('disabled');}if (!jQuery(ele).data('deletable')){contentEle.find('.deleteFilter').remove();// This propogates to the next iteration of the each() method; removing the entire li}else{contentEle.find('ul').append(deleteEle);// Add back if missingcontentEle.find('.deleteFilter').removeClass('disabled');}
@lord_alan Please do let us known how are you making use of is-admin data attribute added to tpl and also, There is no check handled before appending deleteEle and editEle to contentElem, As to append only if it's missed.
Your second question is right. I tested it from both an admin user and a non-admin user and didn't see multiple editEle or deleteEle elements added back - but this was a quick test just to get my customer to see if worked. It would be fairly simple to check for the existence of the edit or delete filter class (jQuery.hasClass()) and only add if it was missing.
if(contentEle.find('li').hasClass('editFilter')===false){contentEle.find('ul').append(editEle);// Add back if missing}contentEle.find('.editFilter').removeClass('disabled');
Changing the order of the code and using prepend, rather than append, makes the order of the popup options display the same:
if((jQuery(ele).data('ismine')===false)&&(jQuery(ele).data('isadmin')===false)){contentEle.find('.editFilter').css("display","none");contentEle.find('.deleteFilter').css("display","none");}if (!jQuery(ele).data('deletable')){contentEle.find('.deleteFilter').remove();// This propogates to the next iteration of the each() method; removing the entire li}else{if(contentEle.find('li').hasClass('deleteFilter')===false){contentEle.find('ul').prepend(deleteEle);// Add back if missing}contentEle.find('.deleteFilter').removeClass('disabled');}if (!jQuery(ele).data('editable')){contentEle.find('.editFilter').remove();// This propogates to the next iteration of the each() method; removing the entire li}else{if(contentEle.find('li').hasClass('editFilter')===false){contentEle.find('ul').prepend(editEle);// Add back if missing}contentEle.find('.editFilter').removeClass('disabled');}