GatherPress / gatherpress

Powering our community's event management needs.
https://wordpress.org/plugins/gatherpress/
GNU General Public License v2.0
94 stars 30 forks source link

Roles / capabilities #445

Open javiercasares opened 11 months ago

javiercasares commented 11 months ago

An event can have different people performing various roles within the system. These roles are typically summarized into several levels:

Generally, these five roles should suffice.

This could lead to some capabilities such as:

The corresponding capabilities for each role would be:

mauteri commented 11 months ago

I like this idea, but some things to think about.

javiercasares commented 11 months ago

My proposal was based on https://developer.wordpress.org/plugins/users/roles-and-capabilities/

There are different ways to do this, and we can use the native roles and capabilities, but, in my experience, it is better to have your own, for better security. Moreover, we can match the actual ones with the proposed, but, I was thinking more on WooCommerce for example with their specific roles.

But, in any case, is something to think about.

I can try to talk to some “Plugins Team” people and check with them what is the best way (from a plugin reviewer perspective) and go from there.

mauteri commented 11 months ago

Awesome thanks Javier! Yes, getting the plugins team's perspective I think would be great insight.

javiercasares commented 11 months ago

Hello @pacomarchante and @frantorres. Could you check this? :) please!

carstingaxion commented 2 months ago

I have outlined a new idea on Roles & Caps in #872 and would like to read your opinions @javiercasares and @mauteri

This is not meant to replace the need for explicit Roles & capabilities, but could be its foundation. Someone could earn the permission to edit an event, if this exact user has made a comment (with comment_type rsvp and term organizing), which got approved. Going this way would allow GatherPress to assign all or some of the special capabilities @javiercasares described in #445, without having to use explicit WordPress roles or custom capabilities, that a site owner might need to assign to somebody in the first hand. Those caps could be assigned dynamically based on the comment, using user_has_cap .