Granular group-based permissions for anonymous and logged in users

Okay thanks for finding examples, will have to incorporate this change into theme setting objects with the group type. This one for example from group sidebar menus, I think I would make it work in the same way, so you have this in the config:

groups:
  type: groups
  required: true
  resolve_group_memberships: true
  validations:
    max: 20

Then on the client groups would become user_in_groups as a boolean.

The disallowed_groups functionality might not be too hard actually…taking the above again you’d end up with this to get rid of anonymous_users:

groups:
  type: groups
  required: true
  resolve_group_memberships: true
  disallowed_groups: "4"
  validations:
    max: 20

And for the regular group type theme settings:

copy_button_allowed_groups:
  type: list
  list_type: group
  default: "11" # trust_level_1
  disallowed_groups: "4" # anonymous_users
  description: "Select the groups that are allowed to use the copy button."
  resolve_group_membership: true

Will see about adding this functionality.

2 Likes