Set default permissions?

Is it possible to set default permissions at the group level?

For example, if I create a new content type (collection or singleton) can the default permissions be set to a specific group.

My use case is that I want a specific group type to be able to automatically be able to view/edit any newly created content types.

Do you mean this tab?

@ronaldaug yes, I’d like to have preset/default definitions any time I create a content type (collection or singleton).

Sorry for late reply,
There are 2 options for you
Option 1
you can manually create a specific role in config.yml as below and let a user that has editor role create a collection, so that the permissions will apply to it.

groups:
  editor:
    $admin: false
    cockpit:
      backend: true
      accounts: true
      finder: true
      rest: true
      info: true
    collections:
      create: false
      delete: false
      manage: true

Option 2
I’d recommend you to use cockpit_GROUPS .
It’s quite easy to manage roles and permissions.

@jasonday

@Hackbard is currently brain storming ideas for a similar issue with collections and group permissions.

He had the brilliant idea to tap into the collections.createcollection and singleton.save.after events. (yes, the naming convention is a little off here)

You could use these events to trigger an auto-update of your config.php.
You could automate the “Option 1” by @ronaldaug that way.

2 Likes

Absolute! IMHO Best way