Use write only permission by default

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-12-04 07:50:53 +01:00
parent c33b41dcbe
commit 9e58207392
3 changed files with 12 additions and 9 deletions

View File

@@ -125,8 +125,8 @@ app.factory('BoardService', function (ApiService, $http, $q) {
displayname: ocsItem.label
},
permissionEdit: true,
permissionManage: true,
permissionShare: true,
permissionManage: false,
permissionShare: false,
type: type
};
};

View File

@@ -417,15 +417,15 @@ class BoardService {
throw new BadRequestException('participant must be provided');
}
if ($edit === false || $edit === null) {
if ($edit === null) {
throw new BadRequestException('edit must be provided');
}
if ($share === false || $share === null) {
if ($share === null) {
throw new BadRequestException('share must be provided');
}
if ($manage === false || $manage === null) {
if ($manage === null) {
throw new BadRequestException('manage must be provided');
}

View File

@@ -56,13 +56,13 @@
{{ acl.participant.displayname }}
</span>
<span class="sharingOptionsGroup">
<span class="shareOption" ng-if="boardservice.canManage()">
<input type="checkbox" class="permissions checkbox" id="checkbox-permission-{{ acl.id }}-share" ng-model="acl.permissionShare" ng-change="aclUpdate(acl)" />
<label for="checkbox-permission-{{ acl.id }}-share"><?php p($l->t('Share')); ?></label>
</span>
<span class="shareOption"ng-if="boardservice.canManage()">
<input type="checkbox" class="permissions checkbox" id="checkbox-permission-{{ acl.id }}-edit" ng-model="acl.permissionEdit" ng-change="aclUpdate(acl)" />
<label for="checkbox-permission-{{ acl.id }}-edit"><?php p($l->t('Edit')); ?></label>
</span>
<span class="shareOption" ng-if="boardservice.canManage()">
<input type="checkbox" class="permissions checkbox" id="checkbox-permission-{{ acl.id }}-share" ng-model="acl.permissionShare" ng-change="aclUpdate(acl)" />
<label for="checkbox-permission-{{ acl.id }}-share"><?php p($l->t('Share')); ?></label>
</span>
<span class="shareOption"ng-if="boardservice.canManage()">
<input type="checkbox" class="permissions checkbox" id="checkbox-permission-{{ acl.id }}-manage" ng-model="acl.permissionManage" ng-change="aclUpdate(acl)" />
@@ -71,6 +71,9 @@
</span>
<a ng-if="boardservice.canManage()" ng-click="aclDelete(acl)"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually"><?php p($l->t('Discard share')); ?></span></a>
</li>
<li ng-if="!boardservice.canShare()">
<?php p($l->t('Sharing has been disabled for your account.')); ?>
</li>
</ul>
</div>