# Alias dello staff di Discourse

**URL:** <https://meta.discourse.org/t/discourse-staff-alias/156202>\
**Category:** Plugin\
**Tags:** official, staff-alias\
**Created:** [29 Giugno 2020, 1:37am UTC](https://meta.discourse.org/t/discourse-staff-alias/156202 "2020-06-29T01:37:01Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![fokx](https://avatars.discourse-cdn.com/v4/letter/f/958977/32.png) [@fokx](https://meta.discourse.org/u/fokx)\
**Post date:** [24 Maggio 2024, 9:06am UTC](https://meta.discourse.org/t/discourse-staff-alias/156202/25 "2024-05-24T09:06:35Z")

</div>

Incontro lo stesso errore ogni volta che rispondo a un post che **non** è OP:

> Si è verificato un errore: non sei autorizzato a visualizzare la risorsa richiesta.

Dopo aver approfondito un po’, ho scoperto che il colpevole si trova qui:

> <https://github.com/discourse/discourse-staff-alias/blob/5e1855a2321c32a8fd4c78988954fa57f29b9cb9/lib/discourse_staff_alias/posts_controller_extension.rb#L17>

Il problema è:

`params[:whisper]` è `\"false\"`, che è una stringa, quindi basta cambiare questa riga in:

```ruby
if !DiscourseStaffAlias.user_allowed?(existing_user) || params[:whisper] == \"true\"

```

…risolverà il problema.

Ho creato una semplice PR: [FIX: InvalidAccess when replying to non-original post by fokx · Pull Request #67 · discourse/discourse-staff-alias · GitHub](https://github.com/discourse/discourse-staff-alias/pull/67)

---

_[View the full topic](https://meta.discourse.org/t/discourse-staff-alias/156202)._
