add dialog window for public and allusers access

This commit is contained in:
Alexandre Cloutier authored and Francis Lachapelle committed 2014-11-11 22:32:45 -05:00
1 parent 29d114188f
commit dcb3fbc7e6
2 files changed
+34 -4

No files matched your search

+2 -2
View File
@@ -6,9 +6,9 @@ WEBSERVER_RESOURCE_DIRS = css fonts img js
build-static-files:
@if [ -d bower_components ]; then \
bower update; \
bower update --allow-root; \
else \
bower install; \
bower install --allow-root; \
fi
( cd bower_components/underscore/ && npm run-script build )
grunt build
+32 -2
View File
@@ -197,9 +197,39 @@
};
$scope.saveModal = function() {
if(!_.isEmpty(dirtyObjects)) {
$scope.AclUsers.saveUsersRights(dirtyObjects);
if(dirtyObjects["anonymous"])
{
Dialog.confirm(l("Warning"), l("Any user with an account on this system will be able to access your folder. Are you certain you trust them all?")).then(function(res){
if(res){
$scope.AclUsers.saveUsersRights(dirtyObjects);
$modalInstance.close();
};
})
}
else if (dirtyObjects["<default>"]) {
Dialog.confirm(l("Warning"), l("Potentially anyone on the Internet will be able to access your folder, even if they do not have an account on this system. Is this information suitable for the public Internet?")).then(function(res){
if(res){
$scope.AclUsers.saveUsersRights(dirtyObjects);
$modalInstance.close();
};
})
}
else {
$scope.AclUsers.saveUsersRights(dirtyObjects);
var usersToSubscribe = [];
angular.forEach(dirtyObjects, function(dirtyObject){
if(dirtyObject.canSubscribeUser && dirtyObject.isSubscribed){
usersToSubscribe.push(dirtyObject.uid);
}
})
if(!_.isEmpty(usersToSubscribe))
$scope.AclUsers.subscribeUsers(usersToSubscribe);
$modalInstance.close();
}
}
$modalInstance.close();
else
$scope.$aclEditorModal.remove();
};
$scope.removeUser = function() {
if (!_.isEmpty($scope.userSelected)) {