| | |
| | | /** |
| | | * ACL plugin script |
| | | * |
| | | * @version 0.6 |
| | | * @version 0.6.1 |
| | | * @author Aleksander Machniak <alec@alec.pl> |
| | | */ |
| | | |
| | |
| | | rcmail.acl_list_init(); |
| | | // enable autocomplete on user input |
| | | if (rcmail.env.acl_users_source) { |
| | | rcmail.init_address_input_events($('#acluser'), {action:'plugin.acl-autocomplete'}); |
| | | rcmail.init_address_input_events($('#acluser'), {action:'settings/plugin.acl-autocomplete'}); |
| | | // fix inserted value |
| | | rcmail.addEventListener('autocomplete_insert', function(e) { |
| | | if (e.field.id != 'acluser') |
| | |
| | | var users = this.acl_get_usernames(); |
| | | |
| | | if (users && users.length && confirm(this.get_label('acl.deleteconfirm'))) { |
| | | this.http_request('plugin.acl', '_act=delete&_user='+urlencode(users.join(',')) |
| | | this.http_request('settings/plugin.acl', '_act=delete&_user='+urlencode(users.join(',')) |
| | | + '&_mbox='+urlencode(this.env.mailbox), |
| | | this.set_busy(true, 'acl.deleting')); |
| | | } |
| | |
| | | return; |
| | | } |
| | | |
| | | this.http_request('plugin.acl', '_act=save' |
| | | this.http_request('settings/plugin.acl', '_act=save' |
| | | + '&_user='+urlencode(user) |
| | | + '&_acl=' +rights |
| | | + '&_mbox='+urlencode(this.env.mailbox) |
| | |
| | | { |
| | | this.env.acl_advanced = !this.env.acl_advanced; |
| | | this.enable_command('acl-delete', 'acl-edit', false); |
| | | this.http_request('plugin.acl', '_act=list' |
| | | this.http_request('settings/plugin.acl', '_act=list' |
| | | + '&_mode='+(this.env.acl_advanced ? 'advanced' : 'simple') |
| | | + '&_mbox='+urlencode(this.env.mailbox), |
| | | this.set_busy(true, 'loading')); |