Merge pull request #4410 from owncloud/fix_sharing_defaults

Fix sharing defaults
This commit is contained in:
Jörn Friedrich Dreyer 2013-08-13 15:27:24 -07:00
commit 435e63b5ee
2 changed files with 3 additions and 2 deletions

View File

@ -157,6 +157,7 @@ var OC={
PERMISSION_UPDATE:2, PERMISSION_UPDATE:2,
PERMISSION_DELETE:8, PERMISSION_DELETE:8,
PERMISSION_SHARE:16, PERMISSION_SHARE:16,
PERMISSION_ALL:31,
webroot:oc_webroot, webroot:oc_webroot,
appswebroots:(typeof oc_appswebroots !== 'undefined') ? oc_appswebroots:false, appswebroots:(typeof oc_appswebroots !== 'undefined') ? oc_appswebroots:false,
currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false, currentUser:(typeof oc_current_user!=='undefined')?oc_current_user:false,

View File

@ -256,8 +256,8 @@ OC.Share={
var shareType = selected.item.value.shareType; var shareType = selected.item.value.shareType;
var shareWith = selected.item.value.shareWith; var shareWith = selected.item.value.shareWith;
$(this).val(shareWith); $(this).val(shareWith);
// Default permissions are Read and Share // Default permissions are Edit (CRUD) and Share
var permissions = OC.PERMISSION_READ | OC.PERMISSION_SHARE; var permissions = OC.PERMISSION_ALL;
OC.Share.share(itemType, itemSource, shareType, shareWith, permissions, function() { OC.Share.share(itemType, itemSource, shareType, shareWith, permissions, function() {
OC.Share.addShareWith(shareType, shareWith, selected.item.label, permissions, possiblePermissions); OC.Share.addShareWith(shareType, shareWith, selected.item.label, permissions, possiblePermissions);
$('#shareWith').val(''); $('#shareWith').val('');