Permalink
Browse files

Expose default handler for categories for managers

Fixes #24346
  • Loading branch information...
vboctor committed Apr 23, 2018
1 parent 8758ab8 commit 021c13f7661ecce44647cb65512b4f45f225795c
Showing with 6 additions and 2 deletions.
  1. +6 −2 api/soap/mc_project_api.php
@@ -892,14 +892,18 @@ function mci_project_categories( $p_project_id ) {
$t_results = array();
foreach( $t_categories as $t_category ) {
$t_project_id = (int)$t_category['project_id'];
$t_result = array(
'id' => (int)$t_category['id'],
'name' => $t_category['name'],
'project' => array( 'id' => (int)$t_category['project_id'], 'name' => $t_category['project_name'] ),
'project' => array( 'id' => $t_project_id, 'name' => $t_category['project_name'] ),
);
# Do access check here to take into consider the project id that the category is associated with
# in case of inherited categories.
$t_default_handler_id = (int)$t_category['user_id'];
if( $t_default_handler_id != 0 ) {
if( $t_default_handler_id != 0 &&
access_has_project_level( config_get( 'manage_project_threshold', null, null, $t_project_id ), $t_project_id ) ) {
$t_result['default_handler'] = mci_account_get_array_by_id( $t_default_handler_id );
}

0 comments on commit 021c13f

Please sign in to comment.