<commit_before>class CreatePermission:
    pass


class EditPermission:
    pass


class SupportPermission:
    pass


class VotePermission:
    pass


class ViewPermission:
    pass<commit_msg>protect views with write type permissions by default<commit_after>from ekklesia_portal.app import App
from ekklesia_portal.identity_policy import NoIdentity

class WritePermission:
    pass

class CreatePermission(WritePermission):
    pass


class EditPermission(WritePermission):
    pass


class SupportPermission(WritePermission):
    pass


class VotePermission(WritePermission):
    pass


class ViewPermission:
    pass


@App.permission_rule(model=object, permission=WritePermission, identity=NoIdentity)
def has_write_permission_not_logged_in(identity, model, permission):
    """Protects all views with write actions from users that aren't logged in."""
    return False
{'fraction_non_alphanumeric': 0.05606407322654462, 'fraction_numerical': 0.0, 'mean_word_length': 5.076388888888889, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4605810', 'n_tokens_mistral': 239, 'n_tokens_neox': 227, 'n_words': 68}