mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 06:55:59 +03:00
Merge pull request #2168 from nextcloud/display-default-permissions-share
Display the correct default permissions when creating a share.
This commit is contained in:
commit
4fec77e9c0
3 changed files with 4 additions and 6 deletions
|
@ -149,9 +149,6 @@ void OcsShareJob::createShare(const QString &path,
|
|||
addParam(QString::fromLatin1("path"), path);
|
||||
addParam(QString::fromLatin1("shareType"), QString::number(shareType));
|
||||
addParam(QString::fromLatin1("shareWith"), shareWith);
|
||||
if (!(permissions & SharePermissionDefault)) {
|
||||
addParam(QString::fromLatin1("permissions"), QString::number(permissions));
|
||||
}
|
||||
|
||||
start();
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ enum SharePermission {
|
|||
SharePermissionCreate = 4,
|
||||
SharePermissionDelete = 8,
|
||||
SharePermissionShare = 16,
|
||||
SharePermissionDefault = 1 << 30
|
||||
SharePermissionDefault = 31
|
||||
};
|
||||
Q_DECLARE_FLAGS(SharePermissions, SharePermission)
|
||||
Q_DECLARE_OPERATORS_FOR_FLAGS(SharePermissions)
|
||||
|
|
|
@ -320,7 +320,8 @@ void ShareUserGroupWidget::slotCompleterActivated(const QModelIndex &index)
|
|||
} else {
|
||||
|
||||
// Default permissions on creation
|
||||
int permissions = SharePermissionRead | SharePermissionUpdate;
|
||||
int permissions = SharePermissionCreate | SharePermissionUpdate
|
||||
| SharePermissionDelete | SharePermissionShare;
|
||||
_manager->createShare(_sharePath, Share::ShareType(sharee->type()),
|
||||
sharee->shareWith(), SharePermission(permissions));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue