# Removing Security Privileges

**URL:** <https://forum.inductiveautomation.com/t/removing-security-privileges/83324>\
**Category:** Ignition\
**Created:** [December 19, 2023, 5:56pm UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324 "2023-12-19T17:56:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Randolph\_Sewell](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@Randolph\_Sewell](https://forum.inductiveautomation.com/u/Randolph_Sewell)\
**Post date:** [December 19, 2023, 5:56pm UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/1 "2023-12-19T17:56:31Z")

</div>

I have to remove all the security privileges' on all buttons etc. because I need to copy the project and give it to a customer. My problem is I have hundreds and hundreds of faceplates and pages so manually going one by one on every single component to see if it has security then remove it is not possible. Is there a way to search for things that have security privilege's on them?

---

<div class="post-metadata">

**Author:** ![Tyler\_Shoemake](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tyler_shoemake/32/55661_2.png) [@Tyler\_Shoemake](https://forum.inductiveautomation.com/u/Tyler_Shoemake)\
**Post date:** [December 19, 2023, 6:37pm UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/2 "2023-12-19T18:37:31Z")

</div>

You could write a script to remove security from the window itself by deleting the permissions.json file for each window in the project. This could probably be done for the templates as well. I would test this first and make sure that deleting a permissions.json won't corrupt the window. As for components and other things, you might could write a script the removes or sets security privileges and loop through all comps on a screen, but I'm not sure of a way to do that.

---

<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:** [December 19, 2023, 7:00pm UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/3 "2023-12-19T19:00:17Z")

</div>

This may be a bit late, but if you have set your security privileges as recommended here, [How to enable a component in for a particular user - #3 by PGriffith](https://forum.inductiveautomation.com/t/how-to-enable-a-component-in-for-a-particular-user/83279/3), it should be just a matter of your customer creating the roles on their system and they're in!

If you have done expression bindings or similar then you'll appreciate the benefits of [Component and Window Security](https://docs.inductiveautomation.com/display/DOC81/Component+and+Window+Security) by the time you're finished. Sorry.

---

<div class="post-metadata">

**Author:** ![Ryan\_Shaw](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Ryan\_Shaw](https://forum.inductiveautomation.com/u/Ryan_Shaw)\
**Post date:** [November 9, 2025, 10:53pm UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/4 "2025-11-09T22:53:13Z")

</div>

I didn’t find an intuitive way in the designer to remove security from a group of objects after it had been assigned. Instead I took the group, copied it into a notepad, removed the part that looks like this  
`<c-c m="putClientProperty" s="2;O;O"> <str>v.per</str> <o cls="com.inductiveautomation.vision.api.client.components.model.security.ComponentPermissions"> <o-c m="setInheritPermissions" s="1;b"><false/></o-c> <o-c m="setRequiredRoles" s="1;[str"><array cls="str" len="0"/></o-c> <o-c m="setRestrictions" s="1;[com.inductiveautomation.vision.api.client.components.model.security.ComponentRestriction"><array cls="com.inductiveautomation.vision.api.client.components.model.security.ComponentRestriction" len="0"/></o-c> </o> </c-c>`  
and then copied it back into the screen with CTRL + I.

---

<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:** [November 9, 2025, 11:03pm UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/5 "2025-11-09T23:03:41Z")

</div>

Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831). You seem to have pasted the lot in as a single line so the word wrap is weird. Or was it all a single line? You can fix it by adding three ``` (backticks) on a line before and after the code block.

---

<div class="post-metadata">

**Author:** ![Ryan\_Shaw](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@Ryan\_Shaw](https://forum.inductiveautomation.com/u/Ryan_Shaw)\
**Post date:** [November 9, 2025, 11:57pm UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/6 "2025-11-09T23:57:36Z")

</div>

Hi Transistor. I did do that initially and it completely cropped what I had. Code blocks don’t like XML I guess.

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [November 10, 2025, 12:41am UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/7 "2025-11-10T00:41:54Z")

</div>

I really don't like the built in security shield that Ignition offers. Much prefer to just create a custom property called permissive, and use that on all input and button components.

---

<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:** [November 10, 2025, 12:54am UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/8 "2025-11-10T00:54:56Z")

</div>

No problem:

```python
<c-c m="putClientProperty" s="2;O;O">
 <str>v.per</str>
 <o cls="com.inductiveautomation.vision.api.client.components.model.security.ComponentPermissions">
   <o-c m="setInheritPermissions" s="1;b">
     <false/>
   </o-c>
   <o-c m="setRequiredRoles" s="1;[str">
      <array cls="str" len="0"/>
   </o-c>
   <o-c m="setRestrictions" s="1;[com.inductiveautomation.vision.api.client.components.model.security.ComponentRestriction">
     <array cls="com.inductiveautomation.vision.api.client.components.model.security.ComponentRestriction" len="0"/>
   </o-c>
 </o>
</c-c>

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 10, 2025, 5:43pm UTC](https://forum.inductiveautomation.com/t/removing-security-privileges/83324/9 "2025-11-10T17:43:14Z")

</div>

For posterity, as the XML snippet above alludes, component permissions are stored via Swing's `putClientProperty` method.

So you could combine a script like this:

> [@Upgrade version makes buttons dissapear (possible bug?)](https://forum.inductiveautomation.com/t/upgrade-version-makes-buttons-dissapear-possible-bug/54921/14):
>
> For anyone finding/being linked to this thread in the future; if you want a ‘middle ground’ solution between a global UI manager key and setting every button up with scripting, you could use a technique like this to recursively modify every button in the window (e.g. in visionWindowOpened): from javax.swing import AbstractButton from com.inductiveautomation.ignition.client.IgnitionLookAndFeel import setBlendMode from de.javasoft.plaf.synthetica.util.Synthetica2DUtils import BlendMode def getCo…

With calling the static method on [`ComponentPermissions`](https://files.inductiveautomation.com/sdk/javadoc/ignition81/8.1.50/com/inductiveautomation/vision/api/client/components/model/security/ComponentPermissions.html#set(javax.swing.JComponent,com.inductiveautomation.vision.api.client.components.model.security.ComponentPermissions)):

To get something like this:

```python
from com.inductiveautomation.vision.api.client.components.model.security import ComponentPermissions

def getComponents(window):
	def walkComponents(component):
		for component in component.components:
			yield component
			walkComponents(component)
	
	return walkComponents(window.rootContainer)

for path in system.gui.getOpenWindowNames():
	win = system.gui.getWindow(path)
	for component in getComponents(win):
		ComponentPermissions.set(component, None)

```

You could open a batch of windows in the designer, then execute that script in the script console, then save those windows and open the next batch, to very quickly remove all configured component security in Vision.
