# Ignition Perspective Deploy

**URL:** <https://forum.inductiveautomation.com/t/ignition-perspective-deploy/98919>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 21, 2024, 8:39am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-deploy/98919 "2024-11-21T08:39:25Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [November 21, 2024, 10:55am UTC](https://forum.inductiveautomation.com/t/ignition-perspective-deploy/98919/9 "2024-11-21T10:55:56Z")

</div>

In the view I got table data filtered by zone with checkboxes,

the permision logic is for some people can see all the zones 0,1,2,3,4,5,6 , some people just one and some people some.

the checkboxes work the way you taught me on custom.zonaFilters with Expression Structure

```python
	selected_levels = []

	if value['listZona_1']:
	    selected_levels.append('01')
	if value['listZona_2']:
	    selected_levels.append('02')
	if value['listZona_3']:
	    selected_levels.append('03')
	if value['listZona_4']:
	    selected_levels.append('04')
	if value['listZona_5']:
	    selected_levels.append('05')
	if value['listZona_6']:
	    selected_levels.append('06')
	

	zona_filter_str = ','.join(selected_levels)
	
	
	return zona_filter_str if selected_levels else None

```

I guess I have to put some logic to diable the checkboxes the user can´t check for filtering.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/6/76674ab3b05b20339ba46707a129ae2e76554278.png)

I got some feedback about how to do it on:

> [@Implementing User-Based Permissions in Query Parameters for Area Filtering](https://forum.inductiveautomation.com/t/implementing-user-based-permissions-in-query-parameters-for-area-filtering/98472):
>
> In Ignition Perspective, I have a query that includes the following line: sql AND Asset.companyLevel IN ({nivelFilter}) The variable nivelFilter represents an area code, which can have values of 1, 2, 3, 4, 5, or 6. now I will get the user zone from the gateway like userRoles = self.session.auth.user.roles userRoles = self.session.auth.user.roles if "Zone\_1" in userRoles: nivelFilter = 1 elif "Zone\_2" in userRoles: nivelFilter = 2 # Other zones return nivelFilter and aply it to …

in the gateway user configuration I already got a note with the zones that user have access to

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/7/27f40b3e7cd81aa3ac8c54d59cee0793dd7de201.png)

the zonaFilters is a parameter on the query of places used to filter the main query

---

_[View the full topic](https://forum.inductiveautomation.com/t/ignition-perspective-deploy/98919)._
