# As an admin, we can't edit a post containing a poll if the original poster currently has not permissions to create polls

**URL:** https://meta.discourse.org/t/as-an-admin-we-cant-edit-a-post-containing-a-poll-if-the-original-poster-currently-has-not-permissions-to-create-polls/223336
**Category:** Bug
**Tags:** size-s
**Created:** [April 5, 2022, 12:14pm UTC](https://meta.discourse.org/t/as-an-admin-we-cant-edit-a-post-containing-a-poll-if-the-original-poster-currently-has-not-permissions-to-create-polls/223336 "2022-04-05T12:14:21Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [April 5, 2022, 12:14pm UTC](https://meta.discourse.org/t/as-an-admin-we-cant-edit-a-post-containing-a-poll-if-the-original-poster-currently-has-not-permissions-to-create-polls/223336/1 "2022-04-05T12:14:21Z")

</div>

See:

- [Can't edit a message as an admin: you don't have permissions to create a poll](https://meta.discourse.org/t/cant-edit-a-message-as-an-admin-you-dont-have-permissions-to-create-a-poll/223334)

- [Cannot edit topic to add poll as admin - #3 by Tanz0rz](https://meta.discourse.org/t/cannot-edit-topic-to-add-poll-as-admin/219900/3)

* * *

This kind of case should be rare, depending on the forum’s setting, and encountered mostly in imported forums I guess.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [April 5, 2022, 12:28pm UTC](https://meta.discourse.org/t/as-an-admin-we-cant-edit-a-post-containing-a-poll-if-the-original-poster-currently-has-not-permissions-to-create-polls/223336/2 "2022-04-05T12:28:55Z")

</div>

I can repro this:

- Test User = TL1, and `poll minimum trust level to create` = TL2
- Edit one of the test user’s posts as admin to try and insert a poll
- Receive error message on save - “You are not allowed to create polls.”
- `HTTP/2 422 Unprocessable Entity` error in browser console

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [April 7, 2022, 1:22am UTC](https://meta.discourse.org/t/as-an-admin-we-cant-edit-a-post-containing-a-poll-if-the-original-poster-currently-has-not-permissions-to-create-polls/223336/3 "2022-04-07T01:22:42Z")

</div>

Thanks … we will get this sorted over the next 4 weeks!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [May 3, 2022, 9:28pm UTC](https://meta.discourse.org/t/as-an-admin-we-cant-edit-a-post-containing-a-poll-if-the-original-poster-currently-has-not-permissions-to-create-polls/223336/5 "2022-05-03T21:28:34Z")

</div>

@nbianca can you add this to your list?

---

<div class="post-metadata">

### Author: ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)
#### Post date: [May 4, 2022, 9:25pm UTC](https://meta.discourse.org/t/as-an-admin-we-cant-edit-a-post-containing-a-poll-if-the-original-poster-currently-has-not-permissions-to-create-polls/223336/6 "2022-05-04T21:25:20Z")

</div>

I fixed this problem in this PR:

> <https://github.com/discourse/discourse/pull/16638>
>
> It used to validate the post from the perspective of the user who
> created the p…ost. That did not work well when an admin attempted to
> add a poll to a post created by a user who cannot create posts because
> it said the user cannot create polls.
> 
> The problem was that it used post.user for the validation process
> instead of post.acting\_user.

---

<div class="post-metadata">

### Author: ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)
#### Post date: [May 7, 2022, 5:00am UTC](https://meta.discourse.org/t/as-an-admin-we-cant-edit-a-post-containing-a-poll-if-the-original-poster-currently-has-not-permissions-to-create-polls/223336/7 "2022-05-07T05:00:00Z")

</div>

This topic was automatically closed after 45 hours. New replies are no longer allowed.
