View Issue Details

IDProjectCategoryView StatusLast Update
0007428mantisbtadministrationpublic2015-12-02 16:48
Reporterjjay Assigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status newResolutionopen 
Product Version1.0.5 
Summary0007428: projects and subprojects creation
Description

We test MANTIS like bugtracking for our company. We raised a limitation on the projects creation.

We would like that the managers (threshold MANAGER) of the one project can create sub-projects for his projects but cannot create project (reserved to administrators – Threshold ADMINISTRATOR). To do that, I have make the following changes :

  • adding a variable: $g_create_subproject_threshold (config_defaults_inc.php, adm_permissions_report.php)
  • I have modified the code what uses the variable g_create_project_threshold (manage_proj_page.php, manage_proj_edit_page.php, manage_proj_create_page.php, manage_proj_create.php) as well as the of localization files.

patch is in attachement

TagsNo tags attached.

Relationships

related to 0010949 new User with admin rights in a project can't create subprojects 

Activities

2006-09-12 04:15

 

patch_subprojects.patch (4,782 bytes)   
diff -rwEup mantis_1.0.5/adm_permissions_report.php mantis_sgam/adm_permissions_report.php
--- mantis_1.0.5/adm_permissions_report.php	2005-07-27 19:42:37.000000000 +0200
+++ mantis_sgam/adm_permissions_report.php	2006-09-11 12:27:45.325587000 +0200
@@ -93,6 +93,7 @@
 	# Projects
 	echo get_section_begin( lang_get( 'projects_link' ) );
 	echo get_capability_row( lang_get( 'create_project' ), config_get( 'create_project_threshold' ) );
+	echo get_capability_row( lang_get( 'create_subproject' ), config_get( 'create_subproject_threshold' ) );
 	echo get_capability_row( lang_get( 'delete_project' ), config_get( 'delete_project_threshold' ) );
 	echo get_capability_row( lang_get( 'manage_projects_link' ), config_get( 'manage_project_threshold' ) );
 	echo get_capability_row( lang_get( 'manage_user_access_to_project' ), config_get( 'project_user_threshold' ) );
diff -rwEup mantis_1.0.5/config_defaults_inc.php mantis_sgam/config_defaults_inc.php
--- mantis_1.0.5/config_defaults_inc.php	2006-07-24 03:43:05.000000000 +0200
+++ mantis_sgam/config_defaults_inc.php	2006-09-11 19:08:33.835252000 +0200
@@ -950,6 +950,9 @@
 	# Threshold needed to create a new project
 	$g_create_project_threshold = ADMINISTRATOR;
 
+	# Threshold needed to create a new project
+	$g_create_subproject_threshold = MANAGER;
+
 	# Threshold needed to be automatically included in private projects
 	$g_private_project_threshold = ADMINISTRATOR;
 
diff -rwEup mantis_1.0.5/lang/strings_english.txt mantis_sgam/lang/strings_english.txt
--- mantis_1.0.5/lang/strings_english.txt	2006-05-07 07:56:22.000000000 +0200
+++ mantis_sgam/lang/strings_english.txt	2006-09-11 17:55:06.382029000 +0200
@@ -1254,6 +1254,7 @@ $s_save_filters = 'Save filters';
 $s_save_filters_as_shared = 'Save filters as shared';
 $s_use_saved_filters = 'Use saved filters';
 $s_create_project = 'Create project';
+$s_create_subproject = 'Create subproject';
 $s_delete_project = 'Delete project';
 $s_manage_project = 'Manage project';
 $s_manage_user_access_to_project = 'Manage user access to a project';
diff -rwEup mantis_1.0.5/lang/strings_french.txt mantis_sgam/lang/strings_french.txt
--- mantis_1.0.5/lang/strings_french.txt	2006-02-19 04:39:48.000000000 +0100
+++ mantis_sgam/lang/strings_french.txt	2006-09-11 17:53:23.375285000 +0200
@@ -1259,6 +1259,7 @@ $s_save_filters = 'Enregistrer les filtr
 $s_save_filters_as_shared = 'Enregistrer les filtres et les partager';
 $s_use_saved_filters = 'Utiliser les fitres enregistr�s';
 $s_create_project = 'Cr�er un projet';
+$s_create_subproject = 'Cr�er un sous-projet';
 $s_delete_project = 'Supprimer un projet';
 $s_manage_project = 'G�rer les projets';
 $s_manage_user_access_to_project = 'G�rer les droits d\'acc�s utilisateur � un projet';
diff -rwEup mantis_1.0.5/manage_proj_create.php mantis_sgam/manage_proj_create.php
--- mantis_1.0.5/manage_proj_create.php	2006-02-03 04:56:34.000000000 +0100
+++ mantis_sgam/manage_proj_create.php	2006-09-11 12:28:15.619757000 +0200
@@ -17,7 +17,7 @@
 	require_once( $t_core_path.'project_hierarchy_api.php' );
 ?>
 <?php
-	access_ensure_global_level( config_get( 'create_project_threshold' ) );
+	access_ensure_global_level( config_get( 'create_subproject_threshold' ) );
 
 	$f_name 		= gpc_get_string( 'name' );
 	$f_description 	= gpc_get_string( 'description' );
diff -rwEup mantis_1.0.5/manage_proj_create_page.php mantis_sgam/manage_proj_create_page.php
--- mantis_1.0.5/manage_proj_create_page.php	2005-08-10 16:20:15.000000000 +0200
+++ mantis_sgam/manage_proj_create_page.php	2006-09-11 12:28:14.933780000 +0200
@@ -11,7 +11,7 @@
 ?>
 <?php require_once( 'core.php' ) ?>
 <?php
-	access_ensure_global_level( config_get( 'create_project_threshold' ) );
+	access_ensure_global_level( config_get( 'create_subproject_threshold' ) );
 ?>
 <?php html_page_top1() ?>
 <?php html_page_top2() ?>
diff -rwEup mantis_1.0.5/manage_proj_edit_page.php mantis_sgam/manage_proj_edit_page.php
--- mantis_1.0.5/manage_proj_edit_page.php	2006-01-01 03:58:50.000000000 +0100
+++ mantis_sgam/manage_proj_edit_page.php	2006-09-12 10:04:21.859596000 +0200
@@ -155,7 +155,7 @@ if ( access_has_global_level ( config_ge
 		<?php echo lang_get( 'subprojects' ) ?>
                 <?php
 	                # Check the user's global access level before allowing project creation
-	                if ( access_has_global_level ( config_get( 'create_project_threshold' ) ) ) {
+	                if ( ( access_has_project_level ( config_get( 'create_subproject_threshold' ) ) ) || ( access_has_global_level ( config_get( 'create_project_threshold' ) ) ) ) {
 	                        print_button( 'manage_proj_create_page.php?parent_id=' . $f_project_id, lang_get( 'create_new_subproject_link' ) );
 	                }
                 ?>
patch_subprojects.patch (4,782 bytes)   

2006-09-12 04:19

 

mantis_subprojects.zip (60,770 bytes)

Issue History

Date Modified Username Field Change
2006-09-12 04:15 jjay New Issue
2006-09-12 04:15 jjay File Added: patch_subprojects.patch
2006-09-12 04:19 jjay File Added: mantis_subprojects.zip
2015-12-02 16:48 atrol Relationship added related to 0010949