Merge pull request #3331 from FinnStutzenstein/no-special-comments-in-export
Hide special comments in export
This commit is contained in:
commit
3c747c01e2
@ -155,7 +155,8 @@ angular.module('OpenSlidesApp.motions.docx', ['OpenSlidesApp.core.docx'])
|
|||||||
var getMotionComments = function (motion) {
|
var getMotionComments = function (motion) {
|
||||||
var fields = Config.get('motions_comments').value;
|
var fields = Config.get('motions_comments').value;
|
||||||
var canSeeComment = function (index) {
|
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 = [];
|
var comments = [];
|
||||||
for (var i = 0; i < fields.length; i++) {
|
for (var i = 0; i < fields.length; i++) {
|
||||||
|
@ -300,7 +300,8 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
|
|||||||
if (includeComments) {
|
if (includeComments) {
|
||||||
var fields = Config.get('motions_comments').value;
|
var fields = Config.get('motions_comments').value;
|
||||||
var canSeeComment = function (index) {
|
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 = [];
|
var comments = [];
|
||||||
for (var i = 0; i < fields.length; i++) {
|
for (var i = 0; i < fields.length; i++) {
|
||||||
@ -962,7 +963,8 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
|
|||||||
exportComments: function (motion, filename) {
|
exportComments: function (motion, filename) {
|
||||||
var fields = Config.get('motions_comments').value;
|
var fields = Config.get('motions_comments').value;
|
||||||
var canSeeComment = function (index) {
|
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 = [];
|
var content = [];
|
||||||
for (var i = 0; i < fields.length; i++) {
|
for (var i = 0; i < fields.length; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user