<commit_before>from django.core.management.base import BaseCommand, CommandError

from ...api import admin
from ...models import Company, CompanyList
from ....users.models import Role, RoleList, PermissionList


DEFAULT_NEW_USER_ROLE_PERMISSIONS = set([
        "PERMISSION_COMPANY_INFO_VIEW",
        "PERMISSION_PRODUCT_VIEW",
        "PERMISSION_TEST_CASE_VIEW",
        "PERMISSION_TEST_CASE_EDIT",
        "PERMISSION_TEST_CYCLE_VIEW",
        "PERMISSION_TEST_RUN_VIEW",
        "PERMISSION_TEST_RUN_EDIT",
        "PERMISSION_TEST_RUN_ASSIGNMENT_EXECUTE",
        "PERMISSION_ENVIRONMENT_VIEW",
        ])

class Command(BaseCommand):
    help = ("Create a company resource and associated default new user role "
            "with appropriate tester permissions.")
    args = '"Company Name"'

    def handle(self, *args, **options):<commit_msg>Remove unneeded TEST_RUN_EDIT permission from default new user role.<commit_after>from django.core.management.base import BaseCommand, CommandError

from ...api import admin
from ...models import Company, CompanyList
from ....users.models import Role, RoleList, PermissionList


DEFAULT_NEW_USER_ROLE_PERMISSIONS = set([
        "PERMISSION_COMPANY_INFO_VIEW",
        "PERMISSION_PRODUCT_VIEW",
        "PERMISSION_TEST_CASE_VIEW",
        "PERMISSION_TEST_CASE_EDIT",
        "PERMISSION_TEST_CYCLE_VIEW",
        "PERMISSION_TEST_RUN_VIEW",
        "PERMISSION_TEST_RUN_ASSIGNMENT_EXECUTE",
        "PERMISSION_ENVIRONMENT_VIEW",
        ])

class Command(BaseCommand):
    help = ("Create a company resource and associated default new user role "
            "with appropriate tester permissions.")
    args = '"Company Name"'

    def handle(self, *args, **options):
{'fraction_non_alphanumeric': 0.08821822402785838, 'fraction_numerical': 0.0, 'mean_word_length': 3.697547683923706, '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': '6714855', 'n_tokens_mistral': 514, 'n_tokens_neox': 498, 'n_words': 116}