Politica su Discourse

:discourse2: Summary Discourse Policy gives the ability to confirm your users have seen or done something, with optional reminders.
:open_book: Install Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately.

Features

Discourse policy shares much of its DNA with polls, it has the goal of ensuring members of a group accept certain policies by clicking a button.

It has some specific features that set it apart from polls:

  1. It must apply to a group.

  2. It can optionally nag members of a group either weekly or daily to click accept on a policy.

  3. The UX makes it very easy to see who accepted and who did not accept a policy.

Configuration

Screenshots

Before clicking accept

After clicking “grey” person on top right

After clicking accept

Creating a policy

Discourse policy registers a custom [policy] BBCode element. Which means you need to write this block of code in your post where you want to show this policy.

[policy group=founders reminder=daily]
I accept this policy will annoy me daily until I click accept
[/policy]

In this case the policy applies to the founders group and a reminder is sent daily to all users that did not accept the policy.

Site settings

policy_enabled : Enable the discourse policy plugin on the site.

policy_restrict_to_staff_posts: Policies may only appear on staff posts.

policy easy revoke: Show the accept and revoke buttons at the same time.

BBCode attributes

The [policy] element can accept the following attributes.

  • group: the group name that policy will apply to required
  • version: the version number of the policy, bump number up to require all users re-accept the policy
  • reminder: remind users of the group to accept policy (weekly or daily), optional, default off
  • accept: text used for accept button, default is “Accept Policy”
  • revoke: text used for revoke button, default is “Revoke Policy”
  • renew: number of days or text describing period (monthly, quarterly or yearly) after which a user needs to re-accept policy
  • renew-start: the first date renewals will start at Eg: 17-10-2017, useful if you want to set the renewal cadence so it happens every half-year (Jan,June)
  • add-users-to-group: accepts a single group as input; users who accept the policy will be automatically added into this group (when policy is manually revoked or if the policy version is updated, user(s) gets removed from group)
  • private: hide users who accepted/did not accept the policy

:information_source: The backend job to check for policy reminders runs every 6 hours. If the reminder element is set to weekly or daily, users who have not accepted a policy will be sent notification reminders to accept the policy only if they have not already received a reminder notification for the policy within the past week or day.

Usage examples

Basic policy:

[policy group="team" reminder="daily" accept="Accept" revoke="Ignore" version="1"]
I have read, understand and acknowledge this policy.
[/policy]

Bumping the revision number, to require that everyone reads the update:

[policy group="team" reminder="daily" accept="Accept" revoke="Ignore" version="2"]
I have read, understand and acknowledge this policy. (Last updated [date=2020-04-23 timezone="America/Los_Angeles"])
[/policy]

Periodic auditing task:

[policy group="audit_committee" reminder="weekly" renew="90" renew-start="01-07-2019" version="1" accept="Assignment Complete"] 
I have ensured that someone is assigned to this quarterly audit task.
[/policy]

CHANGELOG

TODO

  • Optional immediate reminder for new policies
  • Possibly allow certain groups to apply policies (expanding on staff)

Last edited by @david 2025-07-22T13:14:42Z

Check documentPerform check on document:
65 Mi Piace

2 post sono stati divisi in un nuovo argomento: Limitare la creazione delle policy solo al personale?

4 messaggi sono stati divisi in un nuovo argomento: È possibile impedire la revoca dell’accordo su determinate policy?

Sembra che il limite di 200 e policy_max_group_size siano stati rimossi con questo commit. Mi sfugge qualcosa?

3 Mi Piace

6 post sono stati divisi in un nuovo argomento: Persone che ricevono promemoria anche se hanno accettato la policy

Quando una policy con testo del pulsante lungo viene applicata a un gruppo numeroso, l’interfaccia utente viene compromessa: nello screenshot seguente, possiamo vedere che gli avatar formano una colonna quasi infinita che la rende un po’ scomoda. Esaminerò il CSS per vedere se è possibile risolverlo facilmente, ma probabilmente dovrebbe esserci una sorta di riprogettazione:

Rimuovere display: flex su .cooked .policy .user-lists la rende perfetta sul desktop:

Ho finito per usare il seguente CSS:

/* Make policy user list not overflow */
.cooked .policy .user-lists {
    display: block;
}
3 Mi Piace

Errore dopo l’installazione del plugin. Non so perché. Qualcosa relativo a “mentre si tenta di caricare /admin/dashboard/general.json”.

Errore del server

mentre si tenta di caricare [/admin/plugins]

Codice di errore: errore 500

Oops

Il software che alimenta questo forum di discussione ha riscontrato un problema imprevisto. Ci scusiamo per l’inconveniente.

Informazioni dettagliate sull’errore sono state registrate e generata una notifica automatica. Ci daremo un’occhiata.

Non è necessaria alcuna ulteriore azione. Tuttavia, se la condizione di errore persiste, è possibile fornire ulteriori dettagli, inclusi i passaggi per riprodurre l’errore, pubblicando un argomento di discussione nella categoria di feedback del sito.

Ciao,

I pulsanti Accetta/Revoca verranno visualizzati se l’Informativa è in un Argomento di Categoria che è Chiuso in modo da non consentire risposte?

Grazie

Non uso questo plugin da un po’ di tempo, tuttavia penso che consentirà agli utenti di accettare/revocare quando un argomento viene chiuso poiché premere un pulsante non è una risposta, che è ciò che la chiusura impedisce.

1 Mi Piace

ciao, ho una domanda:
Vogliamo usare il plugin Discourse Policy per: forzare gli utenti che accedono per la prima volta ad accettare i Termini di Servizio (ToS). Requisiti:

  • Se non accettano → non possono usare il forum (possono vedere solo la pagina dei ToS)
  • Quando accettano → possono usare il forum + ottenere un badge “ToS”

la mia soluzione è stata quella di creare un nuovo argomento e al suo interno ho aggiunto questo:
[policy group=trust_level_0 reminder=daily add-users-to-group=tos_accepted accept=“Accetto i Termini” version=“1”]
Cliccando su “Accetto i Termini”, confermo di aver letto e di accettare i Termini di Servizio.
[/policy]

ma se un nuovo utente effettua il login, la policy non compare affatto e può fare quello che vuole; vogliamo che solo se clicca su “Accetta” possa accedere alla nostra pagina. Come fare e grazie

Potresti usare un campo personalizzato e collegare le pagine dei Termini di Servizio e delle FAQ. Una volta che un utente le legge, riceverà il badge “Linee guida lette”.

2 Mi Piace

Grazie per la tua risposta: ha funzionato proprio come hai detto. Tuttavia, quello che voglio veramente è visualizzare questo banner dopo che l’utente ha effettuato l’accesso e consentire l’accesso alla pagina solo se l’utente fa clic su “Accetta”. In caso contrario, il banner dovrebbe rimanere visibile e l’utente non dovrebbe essere in grado di interagire con la pagina.

quello che ho adesso è questo:


dopo di che l’utente può accedere normalmente alla nostra pagina

c’è un modo per farlo e grazie

:partying_face: Questo plugin è ora incluso nel core di Discourse come parte di Bundling more popular plugins with Discourse core. Se stai auto-ospitando e utilizzi il plugin, devi rimuoverlo dal tuo app.yml prima del tuo prossimo aggiornamento.

3 Mi Piace

Sarebbe bello se potessi aggiungere la possibilità di rimuovere gli utenti da un gruppo al momento dell’accettazione o rifiuto.

Al momento questa funzione avvisa solo gli utenti (facoltativamente) e aggiunge, a meno che non mi sfugga qualcosa.

Grazie!

1 Mi Piace