<commit_before>define(['jquery', 'ajax', 'app/component/account-role-selection'], function ($, ajax, accountRoleSelection) {

    // Gets the list of global functions
    ajax.get({
        url: 'ui/admin/acl/global',
        successFn: function (fns) {
            // Account selection & global functions
            accountRoleSelection.init(
                $('#acl-account-form'),
                {
                    roles: fns
                }
            )
        }
    })


});<commit_msg>#222 Global ACL - client call<commit_after>define(['jquery', 'ajax', 'app/component/account-role-selection'], function ($, ajax, accountRoleSelection) {

    function addACL(config, id, fn) {
        ajax.put({
            url: 'ui/admin/acl/global/{0}/{1}'.format(id, fn),
            successFn: function () {
                // TODO Refreshes the list of ACLs
            }
        })
    }

    // Gets the list of global functions
    ajax.get({
        url: 'ui/admin/acl/global',
        successFn: function (fns) {
            // Account selection & global functions
            accountRoleSelection.init(
                $('#acl-account-form'),
                {
                    roles: fns,
                    submitFn: addACL
                }
            )
        }
    })


});
{'fraction_non_alphanumeric': 0.13060278207109738, 'fraction_numerical': 0.0038639876352395673, 'mean_word_length': 1.4526515151515151, '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': '4260476', 'n_tokens_mistral': 362, 'n_tokens_neox': 341, 'n_words': 74}