<p>You can create a <a href="http://buildwithcraft.com/docs/plugins/introduction" rel="nofollow">plugin</a> that adds custom user permissions via the <a href="http://buildwithcraft.com/docs/plugins/hooks-reference#registerUserPermissions" rel="nofollow">registerUserPermissions</a> hook.</p>

CC BY-SA 3.0
2015-03-04T19:57:14.993Z
2015-03-04T19:57:14.993Z
Brad Bell
<p>Is it possible to define custom user permissions in Craft? 
I'm building some front end templates that are only accessible by logged in users. Certain parts of this members page should only be accessible to users with specific permissions. I know that I can create multiple groups and use template logic to show / hide certain pages. However, being able to define custom user permissions would be much more flexible. </p>

<p>Say I want to allow a user to access a form, but I don't want to grant access to the other permissions from a different user group. </p>

<pre><code>{% if currentUser.can('submitForm') %}
    {# show form here #}
{% endif %}
</code></pre>

<users><user-groups>
Creating Custom User Permissions
# Creating Custom User Permissions

(Asked by: username_0 on 2015-03-04)

Is it possible to define custom user permissions in Craft? 
I'm building some front end templates that are only accessible by logged in users. Certain parts of this members page should only be accessible to users with specific permissions. I know that I can create multiple groups and use template logic to show / hide certain pages. However, being able to define custom user permissions would be much more flexible. 
Say I want to allow a user to access a form, but I don't want to grant access to the other permissions from a different user group. 
{% if currentUser.can('submitForm') %}
    {# show form here #}
{% endif %}

**Tags:** users, user-groups

---

## 1 answers

### Answer by username_1 on 2015-03-04. Score: 4 | Accepted answer

You can create a [plugin](http://buildwithcraft.com/docs/plugins/introduction) that adds custom user permissions via the [registerUserPermissions](http://buildwithcraft.com/docs/plugins/hooks-reference#registerUserPermissions) hook.


---

