<p>In Craft 3.1, permissions checks are done based on <code>uid</code> now, not <code>id</code>.</p>

<p>This should work:</p>

<pre><code>{{ currentUser.can('editEntries:'~entry.getSection().uid) }}
</code></pre>

CC BY-SA 4.0
2019-02-08T00:44:39.380Z
2019-02-08T00:44:39.380Z
Brad Bell
<p>How do I check permission for editing entries belonging to a specific section?</p>

<p>When I try <code>{{currentUser.can('editEntries:'~entry.sectionId) }}</code>, it returns false - and I am sure that <code>currentUser</code> can edit entries from this section.</p>

<p>edit:
Its craft 3.1</p>

CC BY-SA 4.0
2019-01-28T00:07:28.243Z
Is this Craft 2 or 3?
Brad Bell
CC BY-SA 4.0
2019-02-03T12:42:08.183Z
@BradBell Its craft 3.1.
Piotr Pogorzelski
<permissions>
Checking permission for editing entries from inside template
# Checking permission for editing entries from inside template

(Asked by: username_0 on 2019-01-21)

How do I check permission for editing entries belonging to a specific section?

When I try `{{currentUser.can('editEntries:'~entry.sectionId) }}`, it returns false - and I am sure that `currentUser` can edit entries from this section.

edit:
Its craft 3.1

**Tags:** permissions
> **Comments:**
> **username_1**: Is this Craft 2 or 3?  
> **username_0**: @BradBell Its craft 3.1.  

---

## 1 answers

### Answer by username_1 on 2019-02-08. Score: 2 | Accepted answer

In Craft 3.1, permissions checks are done based on uid now, not id.
This should work:
{{ currentUser.can('editEntries:'~entry.getSection().uid) }}


---

