Commit ffd8dd94 authored by Sascha Pfeiffer's avatar Sascha Pfeiffer

added compliancy link share feature

Signed-off-by: 's avatarSascha Pfeiffer <sascha.pfeiffer@psono.com>
parent 39aadd24
......@@ -149,7 +149,7 @@
<span class="fa-stack"><i class="fa fa-file-text fa-fw"></i></span>{{'SECURITY_REPORT' | translate}}
</a>
</li>
<li ng-class="get_link_state('/active-link-shares')">
<li ng-class="get_link_state('/active-link-shares')" ng-if="enable_link_shares">
<a class="navigationitem2" href="#!/active-link-shares">
<span class="fa-stack"><i class="fa fa-link fa-fw"></i></span>{{'ACTIVE_LINK_SHARES' | translate}}
</a>
......
......@@ -31,7 +31,7 @@
managerDatastorePassword, managerDatastoreUser, managerDatastore, managerSecret, browserClient,
storage, offlineCache, snapRemote, $window, $route, $routeParams, $location, $uibModal, managerStatus) {
$scope.enable_link_shares = storage.find_key('config', 'server_info') && storage.find_key('config', 'server_info').value && (!storage.find_key('config', 'server_info').value.hasOwnProperty('compliance_disable_link_shares') || ! storage.find_key('config', 'server_info').value['compliance_disable_link_shares'])
$scope.open_tab = browserClient.open_tab;
$scope.create_new_datastore = create_new_datastore;
$scope.get_link_state = get_link_state;
......
......@@ -1087,6 +1087,9 @@
if (item.hasOwnProperty('share_rights') && item.share_rights.grant === false) {
return 'hidden';
}
if (!server_supports_link_shares()) {
return 'hidden'
}
},
onClick: function(item, path) {
......@@ -1227,6 +1230,20 @@
return storage.find_key('config', 'server_info') && storage.find_key('config', 'server_info').value && storage.find_key('config', 'server_info').value.hasOwnProperty('files') && storage.find_key('config', 'server_info').value['files']
}
/**
* @ngdoc
* @name psonocli.itemBlueprint#server_supports_link_shares
* @methodOf psonocli.itemBlueprint
*
* @description
* returns whether the server supports link shares or not
*
* @returns {boolean} returns whether the server supports link shares or not
*/
function server_supports_link_shares() {
return storage.find_key('config', 'server_info') && storage.find_key('config', 'server_info').value && (!storage.find_key('config', 'server_info').value.hasOwnProperty('compliance_disable_link_shares') || ! storage.find_key('config', 'server_info').value['compliance_disable_link_shares'])
}
/**
* @ngdoc
* @name psonocli.itemBlueprint#server_credit_buy_address
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment