Skip to content

Commit

Permalink
Add attachment settings to "Workflow Thresholds" page
Browse files Browse the repository at this point in the history
Fixes #26892
  • Loading branch information
atrol committed Apr 26, 2020
1 parent c2da45c commit 1dea5ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions manage_config_work_threshold_page.php
Expand Up @@ -427,6 +427,16 @@ function get_section_end() {
get_capability_row( lang_get( 'edit_own_tags' ), 'tag_edit_own_threshold' );
get_section_end();

# Attachments
if( config_get( 'allow_file_upload' ) == ON ) {
get_section_begin_mcwt( lang_get( 'attachments' ) );
get_capability_row( lang_get( 'view_list_of_attachments' ), 'view_attachments_threshold' );
get_capability_row( lang_get( 'download_attachments' ), 'download_attachments_threshold' );
get_capability_row( lang_get( 'delete_attachments' ), 'delete_attachments_threshold' );
get_capability_row( lang_get( 'upload_issue_attachments' ), 'upload_bug_file_threshold' );
get_section_end();
}

# Others
get_section_begin_mcwt( lang_get( 'others' ) );
get_capability_row( lang_get( 'view' ) . ' ' . lang_get( 'changelog_link' ), 'view_changelog_threshold' );
Expand Down
8 changes: 8 additions & 0 deletions manage_config_work_threshold_set.php
Expand Up @@ -221,6 +221,14 @@ function capability_exists( $p_name ) {
set_capability_row( 'tag_edit_threshold' );
set_capability_row( 'tag_edit_own_threshold' );

# Attachments
if( config_get( 'allow_file_upload' ) == ON ) {
set_capability_row( 'view_attachments_threshold' );
set_capability_row( 'download_attachments_threshold' );
set_capability_row( 'delete_attachments_threshold' );
set_capability_row( 'upload_bug_file_threshold' );
}

# Others
set_capability_row( 'view_changelog_threshold' );
set_capability_row( 'roadmap_view_threshold' );
Expand Down

0 comments on commit 1dea5ad

Please sign in to comment.