<commit_before><div ng-controller="Umbraco.Editors.Content.RightsController as vm">

    <!-- Manage groups -->
    <div ng-show="vm.viewState === 'manageGroups'">
        <div class="umb-dialog-body" ng-cloak>
            <div class="umb-pane">

                <h5>Ut tempor dui nec consectetur efficitur.</h5>
                <p class="abstract" style="margin-bottom: 20px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tellus purus, malesuada sed purus ut, semper sollicitudin odio.</p>

                <div style="position: relative; display: inline-block; margin-bottom: 20px;">
                    <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="#">
                        Add permissions for...
                        <span class="caret" style="margin-left: 10px;"></span>
                    </a>
                    <ul class="dropdown-menu" style="width: 100%;">
                        <li ng-repeat="group in vm.availableUserGroups | filter:{selected: '!true'}">
                            <a href="" ng-click="vm.editPermissions(group)" prevent-default>
                                <i class="{{group.icon}}"></i>
                                {{group.name}}
                            </a>
                        </li>
                    </ul>
                </div>

                <div>
                    <umb-user-group-preview
                        ng-repeat="group in vm.selectedUserGroups"
                        icon="group.icon"
                        name="group.name"
                        permissions="group.allowedPermissions"
                        allow-remove="true"
                        allow-edit="true"
                        on-remove="vm.removePermissions($index, vm.selectedUserGroups)"
                        on-edit="vm.editPermissions(group)">
                    </umb-user-group-preview>
                </div>

            </div>
        </div>

        <div class="umb-dialog-footer btn-toolbar umb-btn-toolbar" ng-hide="success">
            <a class="btn btn-link" ng-click="nav.hideDialog()" ng-if="!busy">
                <localize key="general_cancel">Cancel</localize>
            </a>
            <button class="btn btn-primary" ng-click="save()" ng-disabled="busy">
                <localize key="buttons_save">Save</localize>
            </button>
        </div>

    </div>

    <!-- Manage permissions -->
    <div ng-show="vm.viewState === 'managePermissions'">

        <div class="umb-dialog-body" ng-cloak>
            <div class="umb-pane block-form">
                <h5>Set permissions for {{ vm.selectedUserGroup.name }}</h5>
                <p class="abstract" style="margin-bottom: 20px;">Nam tellus purus, malesuada sed purus ut, semper sollicitudin odio.</p>
                <umb-control-group
                    ng-repeat="group in vm.selectedUserGroup.permissions"
                    label="{{group.groupName}}">
                    <umb-permission
                        ng-repeat="permission in group.permissions"
                        name="permission.name"
                        description="permission.description"
                        selected="permission.checked">
                    </umb-permission>
                </umb-control-group>
            </div>
        </div>

        <div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
            <a class="btn btn-link" ng-click="vm.cancelManagePermissions()">
                <localize key="general_cancel">Cancel</localize>
            </a>
            <button class="btn btn-primary" type="button" ng-click="vm.setPermissions(vm.selectedUserGroup)">
                Set permissions
            </button>
        </div>

    </div>

</div>
<commit_msg>fixes new permissions model mapping on dialog<commit_after><div ng-controller="Umbraco.Editors.Content.RightsController as vm">

    <!-- Manage groups -->
    <div ng-show="vm.viewState === 'manageGroups'">
        <div class="umb-dialog-body" ng-cloak>
            <div class="umb-pane">

                <h5>Ut tempor dui nec consectetur efficitur.</h5>
                <p class="abstract" style="margin-bottom: 20px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam tellus purus, malesuada sed purus ut, semper sollicitudin odio.</p>

                <div style="position: relative; display: inline-block; margin-bottom: 20px;">
                    <a class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="#">
                        Add permissions for...
                        <span class="caret" style="margin-left: 10px;"></span>
                    </a>
                    <ul class="dropdown-menu" style="width: 100%;">
                        <li ng-repeat="group in vm.availableUserGroups | filter:{selected: '!true'}">
                            <a href="" ng-click="vm.editPermissions(group)" prevent-default>
                                <i class="{{group.icon}}"></i>
                                {{group.name}}
                            </a>
                        </li>
                    </ul>
                </div>

                <div>
                    <umb-user-group-preview
                        ng-repeat="group in vm.selectedUserGroups"
                        icon="group.icon"
                        name="group.name"
                        permissions="group.allowedPermissions"
                        allow-remove="true"
                        allow-edit="true"
                        on-remove="vm.removePermissions($index, vm.selectedUserGroups)"
                        on-edit="vm.editPermissions(group)">
                    </umb-user-group-preview>
                </div>

            </div>
        </div>

        <div class="umb-dialog-footer btn-toolbar umb-btn-toolbar" ng-hide="success">
            <a class="btn btn-link" ng-click="nav.hideDialog()" ng-if="!busy">
                <localize key="general_cancel">Cancel</localize>
            </a>
            <button class="btn btn-primary" ng-click="save()" ng-disabled="busy">
                <localize key="buttons_save">Save</localize>
            </button>
        </div>

    </div>

    <!-- Manage permissions -->
    <div ng-show="vm.viewState === 'managePermissions'">

        <div class="umb-dialog-body" ng-cloak>
            <div class="umb-pane block-form">
                <h5>Set permissions for {{ vm.selectedUserGroup.name }}</h5>
                <p class="abstract" style="margin-bottom: 20px;">Nam tellus purus, malesuada sed purus ut, semper sollicitudin odio.</p>
                <umb-control-group
                    ng-repeat="(category, permissions) in vm.selectedUserGroup.permissions"
                    label="{{category}}">
                    <umb-permission
                        ng-repeat="permission in permissions"
                        name="permission.name"
                        description="permission.description"
                        selected="permission.checked">
                    </umb-permission>
                </umb-control-group>
            </div>
        </div>

        <div class="umb-dialog-footer btn-toolbar umb-btn-toolbar">
            <a class="btn btn-link" ng-click="vm.cancelManagePermissions()">
                <localize key="general_cancel">Cancel</localize>
            </a>
            <button class="btn btn-primary" type="button" ng-click="vm.setPermissions(vm.selectedUserGroup)">
                Set permissions
            </button>
        </div>

    </div>

</div>

{'fraction_non_alphanumeric': 0.13397698717100912, 'fraction_numerical': 0.0039677291363576245, 'mean_word_length': 1.5006613756613756, 'pattern_counts': {'":': 0, '<': 131, '<?xml version=': 0, '>': 131, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1885725', 'n_tokens_mistral': 2072, 'n_tokens_neox': 1917, 'n_words': 387}