Skip to content

Commit 0c36ea7

Browse files
committedMar 5, 2013
Print pages: don't show custom fields user has no access to
Prior to this, if a custom field's 'read' access level were higher than the user's access, the print pages would display the field's label (but not the data). This behavior is not consistent with how this situation is handled in the View Issue page, where the field is not shown at all. For consistency, we now skip the of the custom field users have no read access to in the print pages, so that nothing is displayed. Fixes #15528
1 parent f583a45 commit 0c36ea7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
 

‎print_all_bug_page_word.php

+5
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,11 @@
387387
<?php
388388
$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );
389389
foreach( $t_related_custom_field_ids as $t_custom_field_id ) {
390+
# Don't display the field if user does not have read access to it
391+
if ( !custom_field_has_read_access_by_project_id( $t_custom_field_id, $t_bug->project_id ) ) {
392+
continue;
393+
}
394+
390395
$t_def = custom_field_get_definition( $t_custom_field_id );
391396
?>
392397
<tr class="print">

‎print_bug_page.php

+5
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,11 @@
450450

451451
$t_related_custom_field_ids = custom_field_get_linked_ids( $tpl_bug->project_id );
452452
foreach( $t_related_custom_field_ids as $t_id ) {
453+
# Don't display the field if user does not have read access to it
454+
if ( !custom_field_has_read_access_by_project_id( $t_id, $tpl_bug->project_id ) ) {
455+
continue;
456+
}
457+
453458
$t_def = custom_field_get_definition( $t_id );
454459

455460
echo '<tr class="print">';

0 commit comments

Comments
 (0)
Please sign in to comment.