In the default template for the filter module, a filter for a field is displayed even if the current user doesn't have view access to that field.
I added the following line to the foreach ($filters AS $filter) block in the filter template to disable displaying that filter if the user couldn't see that field:
<?php if(!in_array($filter->params->get('core.field_view_access'),JFactory::getUser()->getAuthorisedViewLevels())) continue; ?>
Cobalt generally shows everything for a field except it's value when a user does not have view access. In this case I don't want the user to even see that the field exists. I added similar code to the record list and record templates to hide them as well. If you are in a similar situation, the above code is a very easy way to accomplish this.
In the default template for the filter module, a filter for a field is displayed even if the current user doesn't have view access to that field.
I added the following line to the foreach ($filters AS $filter) block in the filter template to disable displaying that filter if the user couldn't see that field:
Cobalt generally shows everything for a field except it's value when a user does not have view access. In this case I don't want the user to even see that the field exists. I added similar code to the record list and record templates to hide them as well. If you are in a similar situation, the above code is a very easy way to accomplish this.