# How do I restrict/permit the creation of users?

**URL:** <https://forum.inductiveautomation.com/t/how-do-i-restrict-permit-the-creation-of-users/19394>\
**Category:** Ignition\
**Created:** [August 23, 2018, 6:55pm UTC](https://forum.inductiveautomation.com/t/how-do-i-restrict-permit-the-creation-of-users/19394 "2018-08-23T18:55:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![OkiePC](https://avatars.discourse-cdn.com/v4/letter/o/f6c823/32.png) [@OkiePC](https://forum.inductiveautomation.com/u/OkiePC)\
**Post date:** [August 23, 2018, 6:55pm UTC](https://forum.inductiveautomation.com/t/how-do-i-restrict-permit-the-creation-of-users/19394/1 "2018-08-23T18:55:08Z")

</div>

I am using the default internal user source and have several roles defined. I only want Administrators and Supervisors to be allowed to create users. I have the User Management object in the client and I have the tickbox in the Gateway Settings page for “Allow User Admin” set.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [August 23, 2018, 7:13pm UTC](https://forum.inductiveautomation.com/t/how-do-i-restrict-permit-the-creation-of-users/19394/2 "2018-08-23T19:13:34Z")

</div>

Hi Okie,

If you want a user to be able to administer himself (like change his own password), then try putting something like this in the Mode property:

```auto
if(hasRole('Administrators') || hasRole('Supervisors'),
   0,
   1)

```

---

<div class="post-metadata">

**Author:** ![OkiePC](https://avatars.discourse-cdn.com/v4/letter/o/f6c823/32.png) [@OkiePC](https://forum.inductiveautomation.com/u/OkiePC)\
**Post date:** [August 23, 2018, 8:20pm UTC](https://forum.inductiveautomation.com/t/how-do-i-restrict-permit-the-creation-of-users/19394/3 "2018-08-23T20:20:50Z")

</div>

Excellent, thank you! I struggled a little bit until I realized, I had the expression with the roles in plural (as in my post and your reply which I copied and pasted) but in “real life” it’s “Administrator” and “Supervisor” with no “s” on the end of each.

I appreciate the prompt reply and good advice.

Now I will apply the same technique to the schedule and roster management objects.
