diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2016-10-11 10:30:20 +0300 |
---|---|---|
committer | Pranav Kant <pranavk@collabora.co.uk> | 2016-10-11 10:51:35 +0300 |
commit | c24c5a04396f452e1a9be1fa5c304fb5597b684e (patch) | |
tree | d60d4ab81c9194f3d4144abbd7fc7cae36448b12 /js/admin.js | |
parent | 11741054021c42072362c23a7fd2868be56be10b (diff) |
Only allow users to edit documents if part of edit groups
If edit group setting is not set in Collabora Online settings,
then allow all users.
Diffstat (limited to 'js/admin.js')
-rw-r--r-- | js/admin.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/js/admin.js b/js/admin.js index c54e5761..627c2615 100644 --- a/js/admin.js +++ b/js/admin.js @@ -33,13 +33,21 @@ var documentsSettings = { }, initEditGroups: function() { - var groups = $('#edit_group_select').val().split('|'); - if (groups.length) { + var groups = $('#edit_group_select').val(); + if (groups !== '') { OC.Settings.setupGroupsSelect($('#edit_group_select')); $('.edit-groups-enable').attr('checked', 'checked'); } else { $('.edit-groups-enable').attr('checked', null); } + + $.get( + OC.generateUrl('/settings/users/users'), + { limit: 1, pattern: 'admin' }, + function(result) { + console.log(result); + } + ); }, initialize: function() { |