Política de 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 Me gusta
How to make users to explicitly agree to ToS
Have-to-read topics? (or RSVP topics)
Plugin to maintain group membership based on accepting a Policy
Ability to view if PM has been read (Moderation ability?)
Group Membership base on accepting a Discourse Policy
Force existing users to accept ToS
Improving Discourse Policy for large groups
Dashboard Report - Unaccepted Policies
How to get email notifications when new users have signed up?
Is there a plugin that helps with Age Verification on the site?
Restrict posting in a category until they "like" a topic
Topic should be a notification
Button to join group on post
Watching category mandatory
Policy reminder cannot be left empty
Bundling more popular plugins with Discourse core
Age prompt for NSFW catagories
Restrict posting in a category until they "like" a topic
Bump topic with API
Publish group read state
Delivered and read notifications?
Habit tracking within Discourse...is it possible?
Changing policy texts
Agree to additional terms before joining group
Know who has viewed your post
How can I compare arbitrary revisions of a post?
Require accepting new terms (after changes) as a modal inside forum
Tips into building a community aside a variety of already existing tools
How to force existing users to accept ToS
Plugin to gather approvals / signatures on an initiative?
Recommnded plugins for supporting a tech community run by a big enterprise?
AUP location
I can't display my policy
Best practices for communicating to user base

2 publicaciones se dividieron en un nuevo tema: ¿Limitar la creación de políticas solo al personal?

4 publicaciones se dividieron en un nuevo tema: ¿Es posible prohibir la revocación del acuerdo a ciertas políticas?

Parece que el límite de 200 y policy_max_group_size se eliminaron con este commit. ¿Me estoy perdiendo algo?

3 Me gusta

6 publicaciones se dividieron en un nuevo tema: Personas que reciben recordatorios a pesar de haber aceptado la política

Cuando se aplica una política con texto de botón largo a un grupo grande, la interfaz de usuario se estropea: en la captura de pantalla a continuación, podemos ver que los avatares forman una columna casi infinita que lo hace un poco incómodo. Investigaré el CSS para ver si se puede solucionar fácilmente, pero probablemente debería haber algún tipo de rediseño:

Eliminar display: flex en .cooked .policy .user-lists hace que se vea bien en el escritorio:

Terminé usando el siguiente CSS:

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

Error al instalar el plugin. No sé por qué. Algo relacionado con “al intentar cargar /admin/dashboard/general.json”.

Error del servidor

al intentar cargar [/admin/plugins]

Código de error: error 500

Oops

El software que impulsa este foro de discusión encontró un problema inesperado. Lamentamos las molestias.

La información detallada sobre el error se registró y se generó una notificación automática. Le echaremos un vistazo.

No es necesaria ninguna acción adicional. Sin embargo, si la condición de error persiste, puede proporcionar detalles adicionales, incluidos los pasos para reproducir el error, publicando un tema de discusión en la categoría de comentarios del sitio.

Hola,

¿Se mostrarán los botones Aceptar/Revocar si la Política está en un Tema de Categoría que está Cerrado y no permite respuestas?

Gracias

No he usado este plugin en un tiempo, sin embargo, creo que permitirá a los usuarios aceptar/revocar cuando un tema se cierra, ya que presionar un botón no es una respuesta, que es lo que el cierre previene.

1 me gusta

Hola, tengo una pregunta:
Queremos usar el plugin Discourse Policy para: obligar a los usuarios nuevos a aceptar los Términos de Servicio (ToS). Requisitos:

  • Si no aceptan → no pueden usar el foro (solo ver la página de ToS)
  • Cuando aceptan → pueden usar el foro + obtener una insignia de “ToS”

Mi solución fue crear un nuevo tema y dentro agregué esto:
[policy group=trust_level_0 reminder=daily add-users-to-group=tos_accepted accept=“Acepto los términos” version=“1”]
Al hacer clic en “Acepto los términos”, confirmo que he leído y acepto los Términos de Servicio.
[/policy]

Pero si un nuevo usuario inicia sesión, la política no aparece en absoluto y puede hacer lo que quiera. Queremos que solo si hace clic en “Aceptar” pueda acceder a nuestra página. ¿Cómo hacer eso y gracias?

Podrías usar un campo personalizado y enlazar la página de Términos de Servicio y Preguntas Frecuentes. Una vez que un usuario las lea, recibirá la insignia ‘Lee las directrices’.

2 Me gusta

Gracias por tu respuesta; funcionó tal como dijiste. Sin embargo, lo que realmente quiero es mostrar este banner después de que el usuario inicie sesión, y solo permitir el acceso a la página si el usuario hace clic en ‘Aceptar’. Si no, el banner debe permanecer visible y el usuario no debería poder interactuar con la página.

lo que tengo ahora es esto:


después de eso, el usuario puede acceder a nuestra página normalmente

¿hay alguna forma de hacer eso y gracias?

:partying_face: Este plugin ahora está incluido en el núcleo de Discourse como parte de Bundling more popular plugins with Discourse core. Si te autoalojas y usas el plugin, necesitas eliminarlo de tu app.yml antes de tu próxima actualización.

3 Me gusta

Sería bueno si pudieras agregar la capacidad de eliminar usuarios de un grupo al aceptarlos o rechazarlos.

Por ahora, esta función solo molesta a los usuarios (opcionalmente) y agrega, a menos que me esté perdiendo algo.

¡Gracias!

2 Me gusta