Skip to content

add "only platform admin can create groups" and "only groups can create events" restrictions

setop requested to merge setop/mobilizon:usage-restrictions into master

This features set is required for communities who want a better control on who publish content.

Two restrictions are combined :

  • "only platform admin can create groups"
  • "only groups can create events"

This restriction are part of the instance configuration.

When not set, there is no change in the instance behavior (all tests are passing).

Here are the modification that have been made:

  • only platform admin can create groups
    • add to frontend config (apolo and model)
    • add to backend config (graphql, model)
    • remove button from "my group" page
    • add button in "admin / groups" page
    • add role restriction on the "create group" API operation
  • only groups can create events
    • add to frontend config (apolo and model)
    • add to backend config (graphql, model)
    • remove "create" button from navbar
    • remove "create" button from "my event" page
    • add enforcement of "is attributed to" in the resolver

Merge request reports