Blame Identity/Models/Html/Mantis/1.1.2-1.fc9/adm_permissions_report.php

4c79b5
4c79b5
# Mantis - a php based bugtracking system
4c79b5
4c79b5
# Copyright (C) 2000 - 2002  Kenzaburo Ito - kenito@300baud.org
4c79b5
# Copyright (C) 2002 - 2007  Mantis Team   - mantisbt-dev@lists.sourceforge.net
4c79b5
4c79b5
# Mantis is free software: you can redistribute it and/or modify
4c79b5
# it under the terms of the GNU General Public License as published by
4c79b5
# the Free Software Foundation, either version 2 of the License, or
4c79b5
# (at your option) any later version.
4c79b5
#
4c79b5
# Mantis is distributed in the hope that it will be useful,
4c79b5
# but WITHOUT ANY WARRANTY; without even the implied warranty of
4c79b5
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4c79b5
# GNU General Public License for more details.
4c79b5
#
4c79b5
# You should have received a copy of the GNU General Public License
4c79b5
# along with Mantis.  If not, see <http://www.gnu.org/licenses/>.
4c79b5
4c79b5
	# --------------------------------------------------------
4c79b5
	# $Id: adm_permissions_report.php,v 1.11.14.1 2007-10-13 22:32:28 giallu Exp $
4c79b5
	# --------------------------------------------------------
4c79b5
4c79b5
	# ======================================================================
4c79b5
	# Author: Marcello Scata' <marcelloscata at users.sourceforge.net> ITALY
4c79b5
	# ======================================================================
4c79b5
4c79b5
	require_once( 'core.php' );
4c79b5
4c79b5
	access_ensure_project_level( config_get( 'view_configuration_threshold' ) );
4c79b5
4c79b5
	$t_core_path = config_get( 'core_path' );
4c79b5
4c79b5
	html_page_top1( lang_get( 'permissions_summary_report' ) );
4c79b5
	html_page_top2();
4c79b5
4c79b5
	print_manage_menu( 'adm_permissions_report.php' );
4c79b5
	print_manage_config_menu( 'adm_permissions_report.php' );
4c79b5
4c79b5
	function get_section_begin( $p_section_name ) {
4c79b5
		$t_access_levels = explode_enum_string( config_get( 'access_levels_enum_string' ) );
4c79b5
		$t_output = '';
4c79b5
		$t_output .= '' . strtoupper( $p_section_name ) . '' . "\n";
4c79b5
		$t_output .= '' . lang_get( 'perm_rpt_capability' ) . '';
4c79b5
		foreach( $t_access_levels as $t_access_level ) {
4c79b5
			$t_entry_array = explode_enum_arr( $t_access_level );
4c79b5
			$t_output .= ' ' . get_enum_to_string( lang_get( 'access_levels_enum_string' ), $t_entry_array[0] ) . ' ';
4c79b5
		}
4c79b5
		$t_output .= '' . "\n";
4c79b5
4c79b5
		return $t_output;
4c79b5
	}
4c79b5
4c79b5
	function get_capability_row( $p_caption, $p_access_level ) {
4c79b5
		$t_access_levels = explode_enum_string( config_get( 'access_levels_enum_string' ) );
4c79b5
4c79b5
		$t_output = '' . string_display( $p_caption ) . '';
4c79b5
		foreach( $t_access_levels as $t_access_level ) {
4c79b5
			$t_entry_array = explode_enum_arr( $t_access_level );
4c79b5
4c79b5
			if ( (int)$t_entry_array[0] >= (int)$p_access_level ) {
4c79b5
				$t_value = 'X';
4c79b5
			} else {
4c79b5
				$t_value = ' ';
4c79b5
			}
4c79b5
4c79b5
			$t_output .= '' . $t_value . '';
4c79b5
		}
4c79b5
4c79b5
		$t_output .= '' . "\n";
4c79b5
4c79b5
		return $t_output;
4c79b5
	}
4c79b5
4c79b5
	function get_section_end() {
4c79b5
		$t_output = '
' . "\n";
4c79b5
		return $t_output;
4c79b5
	}
4c79b5
4c79b5
	echo '

';
4c79b5
4c79b5
	# News
4c79b5
	echo get_section_begin( lang_get( 'news' ) );
4c79b5
	echo get_capability_row( lang_get( 'view_private_news' ), config_get( 'private_news_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'manage_news' ), config_get( 'manage_news_threshold' ) );
4c79b5
	echo get_section_end();
4c79b5
4c79b5
	# Attachments
4c79b5
	if( config_get( 'allow_file_upload' ) == ON ) {
4c79b5
		echo get_section_begin( lang_get( 'attachments' ) );
4c79b5
		echo get_capability_row( lang_get( 'view_list_of_attachments' ), config_get( 'view_attachments_threshold' ) );
4c79b5
		echo get_capability_row( lang_get( 'download_attachments' ), config_get( 'download_attachments_threshold' ) );
4c79b5
		echo get_capability_row( lang_get( 'delete_attachments' ), config_get( 'delete_attachments_threshold' ) );
4c79b5
		echo get_capability_row( lang_get( 'upload_issue_attachments' ), config_get( 'upload_bug_file_threshold' ) );
4c79b5
		echo get_section_end();
4c79b5
	}
4c79b5
4c79b5
	# Filters
4c79b5
	echo get_section_begin( lang_get( 'filters' ) );
4c79b5
	echo get_capability_row( lang_get( 'save_filters' ), config_get( 'stored_query_create_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'save_filters_as_shared' ), config_get( 'stored_query_create_shared_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'use_saved_filters' ), config_get( 'stored_query_use_threshold' ) );
4c79b5
	echo get_section_end();
4c79b5
4c79b5
	# Projects
4c79b5
	echo get_section_begin( lang_get( 'projects_link' ) );
4c79b5
	echo get_capability_row( lang_get( 'create_project' ), config_get( 'create_project_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'delete_project' ), config_get( 'delete_project_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'manage_projects_link' ), config_get( 'manage_project_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'manage_user_access_to_project' ), config_get( 'project_user_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'automatically_included_in_private_projects' ), config_get( 'private_project_threshold' ) );
4c79b5
	echo get_section_end();
4c79b5
4c79b5
	# Project Documents
4c79b5
	if( config_get( 'enable_project_documentation' ) == ON ) {
4c79b5
		echo get_section_begin( lang_get( 'project_documents' ) );
4c79b5
		echo get_capability_row( lang_get( 'view_project_documents' ), config_get( 'view_proj_doc_threshold' ) );
4c79b5
		echo get_capability_row( lang_get( 'upload_project_documents' ), config_get( 'upload_project_file_threshold' ) );
4c79b5
		echo get_section_end();
4c79b5
	}
4c79b5
4c79b5
	# Custom Fields
4c79b5
	echo get_section_begin( lang_get( 'custom_fields_setup' ) );
4c79b5
	echo get_capability_row( lang_get( 'manage_custom_field_link' ), config_get( 'manage_custom_fields_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'link_custom_fields_to_projects' ), config_get( 'custom_field_link_threshold' ) );
4c79b5
	echo get_section_end();
4c79b5
4c79b5
	# Sponsorships
4c79b5
	if( config_get( 'enable_sponsorship' ) == ON ) {
4c79b5
		echo get_section_begin( lang_get( 'sponsorships' ) );
4c79b5
		echo get_capability_row( lang_get( 'view_sponsorship_details' ), config_get( 'view_sponsorship_details_threshold' ) );
4c79b5
		echo get_capability_row( lang_get( 'view_sponsorship_total' ), config_get( 'view_sponsorship_total_threshold' ) );
4c79b5
		echo get_capability_row( lang_get( 'sponsor_issue' ), config_get( 'sponsor_threshold' ) );
4c79b5
		echo get_capability_row( lang_get( 'assign_sponsored_issue' ), config_get( 'assign_sponsored_bugs_threshold' ) );
4c79b5
		echo get_capability_row( lang_get( 'handle_sponsored_issue' ), config_get( 'handle_sponsored_bugs_threshold' ) );
4c79b5
		echo get_section_end();
4c79b5
	}
4c79b5
4c79b5
	# Others
4c79b5
	echo get_section_begin( lang_get('others') );
4c79b5
	echo get_capability_row( lang_get( 'view' ) . ' ' . lang_get( 'summary_link' ), config_get( 'view_summary_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'see_email_addresses_of_other_users' ), config_get( 'show_user_email_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'send_reminders' ), config_get( 'bug_reminder_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'add_profiles' ), config_get( 'add_profile_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'manage_users_link' ), config_get( 'manage_user_threshold' ) );
4c79b5
	echo get_capability_row( lang_get( 'notify_of_new_user_created' ), config_get( 'notify_new_user_created_threshold_min' ) );
4c79b5
	echo get_section_end();
4c79b5
4c79b5
	html_page_bottom1( __FILE__ );
4c79b5
?>