<commit_before><?php

class Gems_Default_RoleOverviewAction extends \Gems_Controller_ModelSnippetActionAbstract
{
    /**
     *
     * @var \MUtil_Acl
     */
    public $acl;

    /**
     * The parameters used for the autofilter action.
     *
     * When the value is a function name of that object, then that functions is executed
     * with the array key as single parameter and the return value is set as the used value
     * - unless the key is an integer in which case the code is executed but the return value
     * is not stored.
     *
     * @var array Mixed key => value array for snippet initialisation
     */
    protected $autofilterParameters = [
        'columns' => 'getBrowseColumns',
        'browse'  => false,
        'sortableLinks' => false,
    ];

    protected function createModel($detailed, $action)
    {
        $roles = $this->getRoles();
        $first = reset($roles);


        $model = new Gems_Model_PlaceholderModel('privileges', array_keys($first), $roles);
        $model->set('role',
            'label', $this->_('Role')
        );
        $model->set('parents',
            'label', $this->_('Parents'),
            'formatFunction', ['MUtil_Html_TableElement', 'createVar']
        );
        $model->set('allowed',
            'label', $this->_('Allowed'),
            'formatFunction', ['MUtil_Html_TableElement', 'createVar']
        );
        $model->set('inherited',
            'label', $this->_('Inherited'),
            'formatFunction', ['MUtil_Html_TableElement', 'createVar']
        );

        return $model;
    }<commit_msg>#313 make sure assigned privileges and all privileges have a different filename for export Added assigned- to the assigned privileges export filename<commit_after><?php

class Gems_Default_RoleOverviewAction extends \Gems_Controller_ModelSnippetActionAbstract
{
    /**
     *
     * @var \MUtil_Acl
     */
    public $acl;

    /**
     * The parameters used for the autofilter action.
     *
     * When the value is a function name of that object, then that functions is executed
     * with the array key as single parameter and the return value is set as the used value
     * - unless the key is an integer in which case the code is executed but the return value
     * is not stored.
     *
     * @var array Mixed key => value array for snippet initialisation
     */
    protected $autofilterParameters = [
        'columns' => 'getBrowseColumns',
        'browse'  => false,
        'sortableLinks' => false,
    ];

    protected function createModel($detailed, $action)
    {
        $roles = $this->getRoles();
        $first = reset($roles);


        $model = new Gems_Model_PlaceholderModel('assigned-privileges', array_keys($first), $roles);
        $model->set('role',
            'label', $this->_('Role')
        );
        $model->set('parents',
            'label', $this->_('Parents'),
            'formatFunction', ['MUtil_Html_TableElement', 'createVar']
        );
        $model->set('allowed',
            'label', $this->_('Allowed'),
            'formatFunction', ['MUtil_Html_TableElement', 'createVar']
        );
        $model->set('inherited',
            'label', $this->_('Inherited'),
            'formatFunction', ['MUtil_Html_TableElement', 'createVar']
        );

        return $model;
    }
{'fraction_non_alphanumeric': 0.12421052631578948, 'fraction_numerical': 0.0009022556390977444, 'mean_word_length': 2.428865979381443, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, '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': '122314', 'n_tokens_mistral': 941, 'n_tokens_neox': 919, 'n_words': 263}