diff options
author | Joas Schilling <coding@schilljs.com> | 2018-02-21 13:53:06 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2018-02-23 11:19:32 +0300 |
commit | 262654303ef6f544fb706a7ab754f8f3fc544628 (patch) | |
tree | e76a1928dd697f001b03e4c216321b540ab78f14 /js | |
parent | c8911608091e853c10f7260f53c9077f3eff644a (diff) |
Allow to select which groups can impersonate
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'js')
-rw-r--r-- | js/admin_settings.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/js/admin_settings.js b/js/admin_settings.js new file mode 100644 index 0000000..f95571e --- /dev/null +++ b/js/admin_settings.js @@ -0,0 +1,30 @@ +/** + * @copyright Copyright (c) 2018 Joas Schilling <coding@schilljs.com> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +$(document).ready(function() { + var $authorized = $('#impersonate .authorized'); + + OC.Settings.setupGroupsSelect($authorized); + $authorized.change(function(event) { + var groups = event.val || ['admin']; + groups = JSON.stringify(groups); + OCP.AppConfig.setValue('impersonate', 'authorized', groups); + }); +}); |