Merge pull request #4410 from owncloud/fix_sharing_defaults
Fix sharing defaults
This commit is contained in:
commit
435e63b5ee
|
@ -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,
|
||||||
|
|
|
@ -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('');
|
||||||
|
|
Loading…
Reference in New Issue