<commit_before>from pyramid.security import Allow
from pyramid.security import Deny
from adhocracy_core.authorization import IRootACMExtension
from adhocracy_core.interfaces import IResource


# flake8: noqa


def root_acm_extension_adapter(root: IResource) -> dict:
    """Adpater to extend the `root_acm`."""
    acm = \
        {'principals':                                   ['everyone', 'authenticated', 'participant', 'moderator',  'creator', 'initiator', 'admin'],
         'permissions': [['create_user',                   Deny,        None,            None,          None,         None,      None,        Allow],
                         ['view',                          Deny,        Allow,           Allow,         Allow,        Allow,     Allow,       Allow],
                         ['message_to_user',               None,        Deny,            None,          None,         None,      None,        None],
                         ]}
    return acm


def includeme(config):
    config.registry.registerAdapter(root_acm_extension_adapter,<commit_msg>s1: allow initiator to create user<commit_after>from pyramid.security import Allow
from pyramid.security import Deny
from adhocracy_core.authorization import IRootACMExtension
from adhocracy_core.interfaces import IResource


# flake8: noqa


def root_acm_extension_adapter(root: IResource) -> dict:
    """Adpater to extend the `root_acm`."""
    acm = \
        {'principals':                                   ['everyone', 'authenticated', 'participant', 'moderator',  'creator', 'initiator', 'admin'],
         'permissions': [['create_user',                   Deny,        None,            None,          None,         None,      None,        Allow],
                         ['view',                          Deny,        Allow,           Allow,         Allow,        Allow,     Allow,       Allow],
                         ['message_to_user',               None,        Deny,            None,          None,         None,      None,        None],
                         ['message_to_user',               None,        Deny,            None,          None,         None,      None,        None],
                         ['create_user',                   None,        None,            None,          None,         None,      Allow,       None],
                         ['create_group',                  None,        None,            None,          None,         None,      Allow,       None],
                         ['activate_user',                 None,        None,            None,          None,         None,      Allow,       None],
                         ['sdi.view',                      None,        None,            None,          None,         None,      Allow,       None],
                         ['sdi.view-contents',             None,        None,            None,          None,         None,      Allow,       None],
                         ['sdi.add-content',               None,        None,            None,          None,         None,      Allow,       None],
                         ]}
    return acm


def includeme(config):
    config.registry.registerAdapter(root_acm_extension_adapter,
{'fraction_non_alphanumeric': 0.09204758922980588, 'fraction_numerical': 0.000939261114589856, 'mean_word_length': 1.1033574720210666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5008522', 'n_tokens_mistral': 797, 'n_tokens_neox': 744, 'n_words': 192}