# Restrict Toolkit Apps

**URL:** <https://community.shotgridsoftware.com/t/restrict-toolkit-apps/8956>\
**Category:** Pipeline Integrations\
**Created:** [June 8, 2020, 6:56pm UTC](https://community.shotgridsoftware.com/t/restrict-toolkit-apps/8956 "2020-06-08T18:56:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mharris](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/mharris/32/2644_2.png) [@mharris](https://community.shotgridsoftware.com/u/mharris)\
**Post date:** [June 8, 2020, 6:56pm UTC](https://community.shotgridsoftware.com/t/restrict-toolkit-apps/8956/1 "2020-06-08T18:56:14Z")

</div>

Is there a way to control which Toolkit Apps display under which Projects in SG Desktop? Say I have an app “Create Tickets” that I only want to display for certain Projects. I know I could create a Pipeline Config that is restricted to a specific Project. But, is there an easier way to do it without having to create a bunch of Pipeline Configs just to organize the Desktop UI.

 ![Screen Shot 2020-06-08 at 11.50.04 AM](https://global.discourse-cdn.com/shotgunsoftware/original/2X/b/bc75e6c80658611a9b8320bd76b2e7d2beda763e.png)

---

<div class="post-metadata">

**Author:** ![jonas.lindfors](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/jonas.lindfors/32/1046_2.png) [@jonas.lindfors](https://community.shotgridsoftware.com/u/jonas.lindfors)\
**Post date:** [June 9, 2020, 7:42am UTC](https://community.shotgridsoftware.com/t/restrict-toolkit-apps/8956/2 "2020-06-09T07:42:09Z")

</div>

Hi,

I don’t know exactly how your setup looks like, but we have some apps that are “restricted” to specific users, you could do something similar but for projects instead.

We’re using uploaded apps and have added an extra field to the Toolkit App entity called _User restrictions_ where we can add users that should have access to the app. Here you could use project instead of users.

 ![image](https://global.discourse-cdn.com/shotgunsoftware/original/2X/f/f83d74195e2372b280c3065f76202d1bbaf832fb.png)

Then I just put a bit of code in the app.py files init\_app method:

```
# Check if we have user restrictions, and if we have, check if current user should have access to this app
filters = [['id', 'is', 101]]
fields = ["sg_users_restrictions"]
this_app = self.shotgun.find_one("CustomNonProjectEntity04", filters, fields)
user_restrictions = this_app["sg_users_restrictions"]
id_list = []
if len(user_restrictions) == 0:
    pass
else:
    for user in user_restrictions:
        id_list.append(user["id"])

    current_user_id = self.context.user["id"]
    if current_user_id in id_list:
        pass
    else:
        return

```

I have hardcoded the id for the current app, there’s probably a more elegant way of finding that out. But basically I just make a query to find the app and then checking if the current user is added to the User Restrictions field.

It’s a bit “hacky” and would be nice if there was a standardized way of dealing with project/user access. But it works for us!

All best,  
Jonas

---

<div class="post-metadata">

**Author:** ![tannaz](https://sea1.discourse-cdn.com/shotgunsoftware/user_avatar/community.shotgridsoftware.com/tannaz/32/32_2.png) [@tannaz](https://community.shotgridsoftware.com/u/tannaz)\
**Post date:** [June 10, 2020, 1:38am UTC](https://community.shotgridsoftware.com/t/restrict-toolkit-apps/8956/3 "2020-06-10T01:38:25Z")

</div>

Hey @mharris – To add to what @jonas.lindfors suggested, there’s actually a `Project` field on Software entities in Shotgun. If it has a value, _only_ the projects specified there will be able to see the given Software.

It’s documented in our [Admin Guide](https://support.shotgunsoftware.com/hc/en-us/articles/115000067493-Integrations-Admin-Guide#Example:%20Restrict%20software%20versions%20by%20project).
