Skip to content

Commit

Permalink
Print pages: don't show custom fields user has no access to
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dregad committed Mar 5, 2013
1 parent f583a45 commit 0c36ea7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions print_all_bug_page_word.php
Expand Up @@ -387,6 +387,11 @@
<?php
$t_related_custom_field_ids = custom_field_get_linked_ids( $t_bug->project_id );
foreach( $t_related_custom_field_ids as $t_custom_field_id ) {
# Don't display the field if user does not have read access to it
if ( !custom_field_has_read_access_by_project_id( $t_custom_field_id, $t_bug->project_id ) ) {
continue;
}

$t_def = custom_field_get_definition( $t_custom_field_id );
?>
<tr class="print">
Expand Down
5 changes: 5 additions & 0 deletions print_bug_page.php
Expand Up @@ -450,6 +450,11 @@

$t_related_custom_field_ids = custom_field_get_linked_ids( $tpl_bug->project_id );
foreach( $t_related_custom_field_ids as $t_id ) {
# Don't display the field if user does not have read access to it
if ( !custom_field_has_read_access_by_project_id( $t_id, $tpl_bug->project_id ) ) {
continue;
}

$t_def = custom_field_get_definition( $t_id );

echo '<tr class="print">';
Expand Down

0 comments on commit 0c36ea7

Please sign in to comment.