Hide special comments in export

This commit is contained in:
FinnStutzenstein 2017-07-27 12:44:13 +02:00
parent 9dca7fa3b6
commit 2e2d28288a
2 changed files with 6 additions and 3 deletions

View File

@ -153,7 +153,8 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx'])
var getMotionComments = function (motion) {
var fields = Config.get('motions_comments').value;
var canSeeComment = function (index) {
return fields[index].public || operator.hasPerms('motions.can_manage');
var specialComment = fields[index].forState || fields[index].forRecommendation;
return (fields[index].public || operator.hasPerms('motions.can_manage')) && !specialComment;
};
var comments = [];
for (var i = 0; i < fields.length; i++) {

View File

@ -298,7 +298,8 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
if (includeComments) {
var fields = Config.get('motions_comments').value;
var canSeeComment = function (index) {
return fields[index].public || operator.hasPerms('motions.can_manage');
var specialComment = fields[index].forState || fields[index].forRecommendation;
return (fields[index].public || operator.hasPerms('motions.can_manage')) && !specialComment;
};
var comments = [];
for (var i = 0; i < fields.length; i++) {
@ -958,7 +959,8 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
exportComments: function (motion, filename) {
var fields = Config.get('motions_comments').value;
var canSeeComment = function (index) {
return fields[index].public || operator.hasPerms('motions.can_manage');
var specialComment = fields[index].forState || fields[index].forRecommendation;
return (fields[index].public || operator.hasPerms('motions.can_manage')) && !specialComment;
};
var content = [];
for (var i = 0; i < fields.length; i++) {