# Programmatically Edit Security Zone

**URL:** <https://forum.inductiveautomation.com/t/programmatically-edit-security-zone/62499>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [July 30, 2022, 6:37am UTC](https://forum.inductiveautomation.com/t/programmatically-edit-security-zone/62499 "2022-07-30T06:37:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [July 30, 2022, 6:37am UTC](https://forum.inductiveautomation.com/t/programmatically-edit-security-zone/62499/1 "2022-07-30T06:37:48Z")

</div>

Is it possible to programmatically edit a security zone?

My application would be to have tags’ write permissions protected by a role and security zone, but only have the security zone active during a schedule.

Alternatively, is there a better way of allowing write permissions from certain devices but only in allowed hours?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [July 30, 2022, 9:35am UTC](https://forum.inductiveautomation.com/t/programmatically-edit-security-zone/62499/2 "2022-07-30T09:35:10Z")

</div>

What would be writing to those tags? A gateway script? A Vision client? A Perspective client?  
If it’s a script then the script could check the schedule.  
If it’s a client then the right thing to do would be to limit the client by schedule, I would think.

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [July 30, 2022, 3:08pm UTC](https://forum.inductiveautomation.com/t/programmatically-edit-security-zone/62499/3 "2022-07-30T15:08:56Z")

</div>

I currently do it in the client, but I prefer the write permissions directly on the tag. This way there are no discrepancies with security configuration between screens where security was configured differently.

Ideally I would like to be able to enable/disable the security zone, and the tag itself, regardless of what UI element it is written from, is correctly secured.
