|
List Info
Thread: mantisbt bug_change_status_page.php, 1.25, 1.26 bug_update_advanced_page.php, 1.93, 1.94 bug_update_
|
|
| mantisbt bug_change_status_page.php,
1.25, 1.26 bug_update_advanced_page.php,
1.93, 1.94 bug_update_ |

|
2006-12-29 21:36:20 |
Hi David,
When checking access level, please use bug or project
specific access
check rather than the global check. Although a user may
have a global
access of a "reporter", he/she may have a project
access of developer
and hence be able to edit time tracking information for such
project.
Also when checking for the time tracking enabled, please
compare
against ON rather than treating the return value as a
boolean.
On 12/29/06, David Newcomb <davidnewcomb users.sourceforge.net> wrote:
> Update of /cvsroot/mantisbt/mantisbt
> In directory
sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31228
>
> Modified Files:
> bug_change_status_page.php
bug_update_advanced_page.php
> bug_update_page.php bug_view_page.php
bugnote_add_inc.php
> bugnote_edit_page.php bugnote_view_inc.php
> config_defaults_inc.php
> Log Message:
> Add g_time_tracking_view_threshold and
g_time_tracking_edit_threshold to access_has_global_level
>
>
> Index: bugnote_view_inc.php
>
============================================================
=======
> RCS file:
/cvsroot/mantisbt/mantisbt/bugnote_view_inc.php,v
> retrieving revision 1.35
> retrieving revision 1.36
> diff -u -d -r1.35 -r1.36
> --- bugnote_view_inc.php 26 Dec 2006 10:56:07
-0000 1.35
> +++ bugnote_view_inc.php 29 Dec 2006 19:24:16
-0000 1.36
>  -172,7 +172,9 
> }
> echo implode(
', ', $t_to ) . '</em><br /><br />';
> case TIME_TRACKING:
> - echo
'<b><big>', $v3_time_tracking_hhmm,
'</big></b><br /><br />';
> + if (
access_has_global_level( config_get(
'time_tracking_view_threshold' ) ) ) {
> + echo
'<b><big>', $v3_time_tracking_hhmm,
'</big></b><br /><br />';
> + }
> break;
> }
>
>
> Index: bugnote_edit_page.php
>
============================================================
=======
> RCS file:
/cvsroot/mantisbt/mantisbt/bugnote_edit_page.php,v
> retrieving revision 1.51
> retrieving revision 1.52
> diff -u -d -r1.51 -r1.52
> --- bugnote_edit_page.php 20 Dec 2006 19:49:54
-0000 1.51
> +++ bugnote_edit_page.php 29 Dec 2006 19:24:16
-0000 1.52
>  -57,8 +57,13 
> }
>
> $t_bugnote_text = string_textarea(
bugnote_get_text( $f_bugnote_id ) );
> - $t_time_tracking = bugnote_get_field(
$f_bugnote_id, "time_tracking" );
> - $t_time_tracking = db_minutes_to_hhmm(
$t_time_tracking );
> +
> + # No need to gather the extra information if
not used
> + if ( config_get('time_tracking_enabled')
&&
> + access_has_global_level( config_get(
'time_tracking_edit_threshold' ) ) ) {
> + $t_time_tracking = bugnote_get_field(
$f_bugnote_id, "time_tracking" );
> + $t_time_tracking = db_minutes_to_hhmm(
$t_time_tracking );
> + }
>
> # Determine which view page to redirect back
to.
> $t_redirect_url = string_get_bug_view_url(
$t_bug_id );
>  -85,6 +90,7 
> </td>
> </tr>
> <?php if ( config_get('time_tracking_enabled') ) {
?>
> +<?php if ( access_has_global_level( config_get(
'time_tracking_edit_threshold' ) ) ) { ?>
> <tr class="row-2">
> <td class="center"
colspan="2">
> <b><?php echo lang_get(
'time_tracking') ?> (HH:MM)</b><br />
>  -92,6 +98,7 
> </td>
> </tr>
> <?php } ?>
> +<?php } ?>
> <tr>
> <td class="center"
colspan="2">
> <input type="submit"
class="button" value="<?php echo lang_get(
'update_information_button' ) ?>" />
>
> Index: bugnote_add_inc.php
>
============================================================
=======
> RCS file:
/cvsroot/mantisbt/mantisbt/bugnote_add_inc.php,v
> retrieving revision 1.27
> retrieving revision 1.28
> diff -u -d -r1.27 -r1.28
> --- bugnote_add_inc.php 12 Dec 2006 18:26:28 -0000
1.27
> +++ bugnote_add_inc.php 29 Dec 2006 19:24:16 -0000
1.28
>  -71,6 +71,7 
> <?php } ?>
>
> <?php if ( config_get('time_tracking_enabled') ) {
?>
> +<?php if ( access_has_global_level( config_get(
'time_tracking_edit_threshold' ) ) ) { ?>
> <tr <?php echo helper_alternate_class()
?>>
> <td class="category">
> <?php echo lang_get( 'time_tracking'
) ?>
>  -87,6 +88,7 
> </td>
> </tr>
> <?php } ?>
> +<?php } ?>
>
> <tr>
> <td class="center"
colspan="2">
>
> Index: config_defaults_inc.php
>
============================================================
=======
> RCS file:
/cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v
> retrieving revision 1.322
> retrieving revision 1.323
> diff -u -d -r1.322 -r1.323
> --- config_defaults_inc.php 12 Dec 2006 18:26:28
-0000 1.322
> +++ config_defaults_inc.php 29 Dec 2006 19:24:16
-0000 1.323
>  -1787,4 +1787,12 
> # Stop watch to build time tracking field
> $g_time_tracking_stopwatch = OFF;
>
> + # access level required to view time tracking
information
> + $g_time_tracking_view_threshold = DEVELOPER;
> +
> + # access level required to add/edit time
tracking information
> + $g_time_tracking_edit_threshold = DEVELOPER;
> +
> + # access level required to run reports
> + $g_time_tracking_reporting_threshold = MANAGER;
> ?>
>
> Index: bug_update_advanced_page.php
>
============================================================
=======
> RCS file:
/cvsroot/mantisbt/mantisbt/bug_update_advanced_page.php,v
> retrieving revision 1.93
> retrieving revision 1.94
> diff -u -d -r1.93 -r1.94
> --- bug_update_advanced_page.php 16 Dec 2006
19:48:55 -0000 1.93
> +++ bug_update_advanced_page.php 29 Dec 2006
19:24:16 -0000 1.94
>  -535,8 +535,9 
> </tr>
> <?php } ?>
>
> -<!-- Bugnote Time Tracking (if permitted) -->
> +<!-- Time Tracking (if permitted) -->
> <?php if ( config_get('time_tracking_enabled') ) {
?>
> +<?php if ( access_has_global_level( config_get(
'time_tracking_edit_threshold' ) ) ) { ?>
> <tr <?php echo helper_alternate_class()
?>>
> <td class="category">
> <?php echo lang_get( 'time_tracking'
) ?>
>  -546,6 +547,7 
> </td>
> </tr>
> <?php } ?>
> +<?php } ?>
>
> <!-- Submit Button -->
> <tr>
>
> Index: bug_view_page.php
>
============================================================
=======
> RCS file:
/cvsroot/mantisbt/mantisbt/bug_view_page.php,v
> retrieving revision 1.82
> retrieving revision 1.83
> diff -u -d -r1.82 -r1.83
> --- bug_view_page.php 12 Dec 2006 18:26:28 -0000
1.82
> +++ bug_view_page.php 29 Dec 2006 19:24:16 -0000
1.83
>  -446,7 +446,8 
> <?php } ?>
> <?php
> # Time Tracking stats
> - if ( config_get('time_tracking_enabled') ) {
> + if ( config_get('time_tracking_enabled')
&&
> + access_has_global_level( config_get(
'time_tracking_reporting_threshold' ) ) ) {
> include( $t_mantis_dir .
'bugnote_stats_inc.php' );
> }
> # History
>
> Index: bug_change_status_page.php
>
============================================================
=======
> RCS file:
/cvsroot/mantisbt/mantisbt/bug_change_status_page.php,v
> retrieving revision 1.25
> retrieving revision 1.26
> diff -u -d -r1.25 -r1.26
> --- bug_change_status_page.php 12 Dec 2006 18:26:28
-0000 1.25
> +++ bug_change_status_page.php 29 Dec 2006 19:24:16
-0000 1.26
>  -286,6 +286,7 
>
> <?php if ( config_get('time_tracking_enabled') ) {
?>
> <?php if ( access_has_bug_level( config_get(
'private_bugnote_threshold' ), $f_bug_id ) ) { ?>
> +<?php if ( access_has_global_level( config_get(
'time_tracking_edit_threshold' ) ) ) { ?>
> <tr <?php echo helper_alternate_class()
?>>
> <td class="category">
> <?php echo lang_get( 'time_tracking'
) ?>
>  -296,6 +297,7 
> </tr>
> <?php } ?>
> <?php } ?>
> +<?php } ?>
>
> <!-- Submit Button -->
> <tr>
>
> Index: bug_update_page.php
>
============================================================
=======
> RCS file:
/cvsroot/mantisbt/mantisbt/bug_update_page.php,v
> retrieving revision 1.93
> retrieving revision 1.94
> diff -u -d -r1.93 -r1.94
> --- bug_update_page.php 12 Dec 2006 18:26:28 -0000
1.93
> +++ bug_update_page.php 29 Dec 2006 19:24:16 -0000
1.94
>  -410,8 +410,9 
> </tr>
> <?php } ?>
>
> -<!-- Bugnote Time Tracking (if permitted) -->
> +<!-- Time Tracking (if permitted) -->
> <?php if ( config_get('time_tracking_enabled') ) {
?>
> +<?php if ( access_has_global_level( config_get(
'time_tracking_edit_threshold' ) ) ) { ?>
> <tr <?php echo helper_alternate_class()
?>>
> <td class="category">
> <?php echo lang_get( 'time_tracking'
) ?>
>  -421,6 +422,7 
> </td>
> </tr>
> <?php } ?>
> +<?php } ?>
>
>
> <!-- Submit Button -->
>
>
>
------------------------------------------------------------
-------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share your
> opinions on IT & business topics through brief
surveys - and earn cash
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Mantisbt-cvs mailing list
> Mantisbt-cvs lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mantisbt-c
vs
>
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mantisbt-dev mailing list
Mantisbt-dev lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mantisbt-d
ev
|
|
| mantisbt bug_change_status_page.php,
1.25, 1.26 bug_update_advanced_page.php,
1.93, 1.94 bug_update_ |

|
2006-12-30 07:43:26 |
Will do, it will have to wait until 3rd because I'm off to
Cophenhagen, and this is the final email checking while
the misses is getting ready.
Happy New Year everyone,
David.
On Fri, December 29, 2006 9:36 pm, Victor Boctor wrote:
> Hi David,
>
> When checking access level, please use bug or project
specific access
> check rather than the global check. Although a user
may have a global
> access of a "reporter", he/she may have a
project access of developer
> and hence be able to edit time tracking information for
such project.
>
> Also when checking for the time tracking enabled,
please compare
> against ON rather than treating the return value as a
boolean.
>
> On 12/29/06, David Newcomb <davidnewcomb users.sourceforge.net> wrote:
>> Update of /cvsroot/mantisbt/mantisbt
>> In directory
sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv31228
>>
>> Modified Files:
>> bug_change_status_page.php
bug_update_advanced_page.php
>> bug_update_page.php bug_view_page.php
bugnote_add_inc.php
>> bugnote_edit_page.php bugnote_view_inc.php
>> config_defaults_inc.php
>> Log Message:
>> Add g_time_tracking_view_threshold and
g_time_tracking_edit_threshold to
>> access_has_global_level
>>
>>
>> Index: bugnote_view_inc.php
>>
============================================================
=======
>> RCS file:
/cvsroot/mantisbt/mantisbt/bugnote_view_inc.php,v
>> retrieving revision 1.35
>> retrieving revision 1.36
>> diff -u -d -r1.35 -r1.36
>> --- bugnote_view_inc.php 26 Dec 2006
10:56:07 -0000 1.35
>> +++ bugnote_view_inc.php 29 Dec 2006
19:24:16 -0000 1.36
>>  -172,7 +172,9 
>> }
>> echo
implode( ', ', $t_to ) .
>> '</em><br /><br />';
>> case TIME_TRACKING:
>> - echo
'<b><big>',
>> $v3_time_tracking_hhmm,
'</big></b><br /><br />';
>> + if (
access_has_global_level(
>> config_get( 'time_tracking_view_threshold' ) ) ) {
>> +
echo '<b><big>',
>> $v3_time_tracking_hhmm,
'</big></b><br /><br />';
>> + }
>> break;
>> }
>>
>>
>> Index: bugnote_edit_page.php
>>
============================================================
=======
>> RCS file:
/cvsroot/mantisbt/mantisbt/bugnote_edit_page.php,v
>> retrieving revision 1.51
>> retrieving revision 1.52
>> diff -u -d -r1.51 -r1.52
>> --- bugnote_edit_page.php 20 Dec 2006
19:49:54 -0000 1.51
>> +++ bugnote_edit_page.php 29 Dec 2006
19:24:16 -0000 1.52
>>  -57,8 +57,13 
>> }
>>
>> $t_bugnote_text = string_textarea(
bugnote_get_text(
>> $f_bugnote_id ) );
>> - $t_time_tracking = bugnote_get_field(
$f_bugnote_id,
>> "time_tracking" );
>> - $t_time_tracking = db_minutes_to_hhmm(
$t_time_tracking );
>> +
>> + # No need to gather the extra information
if not used
>> + if ( config_get('time_tracking_enabled')
&&
>> + access_has_global_level(
config_get(
>> 'time_tracking_edit_threshold' ) ) ) {
>> + $t_time_tracking =
bugnote_get_field( $f_bugnote_id,
>> "time_tracking" );
>> + $t_time_tracking =
db_minutes_to_hhmm( $t_time_tracking
>> );
>> + }
>>
>> # Determine which view page to redirect
back to.
>> $t_redirect_url = string_get_bug_view_url(
$t_bug_id );
>>  -85,6 +90,7 
>> </td>
>> </tr>
>> <?php if ( config_get('time_tracking_enabled')
) { ?>
>> +<?php if ( access_has_global_level( config_get(
>> 'time_tracking_edit_threshold' ) ) ) { ?>
>> <tr class="row-2">
>> <td class="center"
colspan="2">
>> <b><?php echo lang_get(
'time_tracking') ?>
>> (HH:MM)</b><br />
>>  -92,6 +98,7 
>> </td>
>> </tr>
>> <?php } ?>
>> +<?php } ?>
>> <tr>
>> <td class="center"
colspan="2">
>> <input type="submit"
class="button" value="<?php echo
>> lang_get( 'update_information_button' ) ?>"
/>
>>
>> Index: bugnote_add_inc.php
>>
============================================================
=======
>> RCS file:
/cvsroot/mantisbt/mantisbt/bugnote_add_inc.php,v
>> retrieving revision 1.27
>> retrieving revision 1.28
>> diff -u -d -r1.27 -r1.28
>> --- bugnote_add_inc.php 12 Dec 2006 18:26:28 -0000
1.27
>> +++ bugnote_add_inc.php 29 Dec 2006 19:24:16 -0000
1.28
>>  -71,6 +71,7 
>> <?php } ?>
>>
>> <?php if ( config_get('time_tracking_enabled')
) { ?>
>> +<?php if ( access_has_global_level( config_get(
>> 'time_tracking_edit_threshold' ) ) ) { ?>
>> <tr <?php echo helper_alternate_class()
?>>
>> <td class="category">
>> <?php echo lang_get(
'time_tracking' ) ?>
>>  -87,6 +88,7 
>> </td>
>> </tr>
>> <?php } ?>
>> +<?php } ?>
>>
>> <tr>
>> <td class="center"
colspan="2">
>>
>> Index: config_defaults_inc.php
>>
============================================================
=======
>> RCS file:
/cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v
>> retrieving revision 1.322
>> retrieving revision 1.323
>> diff -u -d -r1.322 -r1.323
>> --- config_defaults_inc.php 12 Dec 2006
18:26:28 -0000 1.322
>> +++ config_defaults_inc.php 29 Dec 2006
19:24:16 -0000 1.323
>>  -1787,4 +1787,12 
>> # Stop watch to build time tracking field
>> $g_time_tracking_stopwatch = OFF;
>>
>> + # access level required to view time
tracking information
>> + $g_time_tracking_view_threshold =
DEVELOPER;
>> +
>> + # access level required to add/edit time
tracking information
>> + $g_time_tracking_edit_threshold =
DEVELOPER;
>> +
>> + # access level required to run reports
>> + $g_time_tracking_reporting_threshold =
MANAGER;
>> ?>
>>
>> Index: bug_update_advanced_page.php
>>
============================================================
=======
>> RCS file:
/cvsroot/mantisbt/mantisbt/bug_update_advanced_page.php,v
>> retrieving revision 1.93
>> retrieving revision 1.94
>> diff -u -d -r1.93 -r1.94
>> --- bug_update_advanced_page.php 16 Dec 2006
19:48:55 -0000
>> 1.93
>> +++ bug_update_advanced_page.php 29 Dec 2006
19:24:16 -0000
>> 1.94
>>  -535,8 +535,9 
>> </tr>
>> <?php } ?>
>>
>> -<!-- Bugnote Time Tracking (if permitted)
-->
>> +<!-- Time Tracking (if permitted) -->
>> <?php if ( config_get('time_tracking_enabled')
) { ?>
>> +<?php if ( access_has_global_level( config_get(
>> 'time_tracking_edit_threshold' ) ) ) { ?>
>> <tr <?php echo helper_alternate_class()
?>>
>> <td class="category">
>> <?php echo lang_get(
'time_tracking' ) ?>
>>  -546,6 +547,7 
>> </td>
>> </tr>
>> <?php } ?>
>> +<?php } ?>
>>
>> <!-- Submit Button -->
>> <tr>
>>
>> Index: bug_view_page.php
>>
============================================================
=======
>> RCS file:
/cvsroot/mantisbt/mantisbt/bug_view_page.php,v
>> retrieving revision 1.82
>> retrieving revision 1.83
>> diff -u -d -r1.82 -r1.83
>> --- bug_view_page.php 12 Dec 2006 18:26:28 -0000
1.82
>> +++ bug_view_page.php 29 Dec 2006 19:24:16 -0000
1.83
>>  -446,7 +446,8 
>> <?php } ?>
>> <?php
>> # Time Tracking stats
>> - if ( config_get('time_tracking_enabled') )
{
>> + if ( config_get('time_tracking_enabled')
&&
>> + access_has_global_level(
config_get(
>> 'time_tracking_reporting_threshold' ) ) ) {
>> include( $t_mantis_dir .
'bugnote_stats_inc.php' );
>> }
>> # History
>>
>> Index: bug_change_status_page.php
>>
============================================================
=======
>> RCS file:
/cvsroot/mantisbt/mantisbt/bug_change_status_page.php,v
>> retrieving revision 1.25
>> retrieving revision 1.26
>> diff -u -d -r1.25 -r1.26
>> --- bug_change_status_page.php 12 Dec 2006
18:26:28 -0000 1.25
>> +++ bug_change_status_page.php 29 Dec 2006
19:24:16 -0000 1.26
>>  -286,6 +286,7 
>>
>> <?php if ( config_get('time_tracking_enabled')
) { ?>
>> <?php if ( access_has_bug_level( config_get(
>> 'private_bugnote_threshold' ), $f_bug_id ) ) {
?>
>> +<?php if ( access_has_global_level( config_get(
>> 'time_tracking_edit_threshold' ) ) ) { ?>
>> <tr <?php echo helper_alternate_class()
?>>
>> <td class="category">
>> <?php echo lang_get(
'time_tracking' ) ?>
>>  -296,6 +297,7 
>> </tr>
>> <?php } ?>
>> <?php } ?>
>> +<?php } ?>
>>
>> <!-- Submit Button -->
>> <tr>
>>
>> Index: bug_update_page.php
>>
============================================================
=======
>> RCS file:
/cvsroot/mantisbt/mantisbt/bug_update_page.php,v
>> retrieving revision 1.93
>> retrieving revision 1.94
>> diff -u -d -r1.93 -r1.94
>> --- bug_update_page.php 12 Dec 2006 18:26:28 -0000
1.93
>> +++ bug_update_page.php 29 Dec 2006 19:24:16 -0000
1.94
>>  -410,8 +410,9 
>> </tr>
>> <?php } ?>
>>
>> -<!-- Bugnote Time Tracking (if permitted)
-->
>> +<!-- Time Tracking (if permitted) -->
>> <?php if ( config_get('time_tracking_enabled')
) { ?>
>> +<?php if ( access_has_global_level( config_get(
>> 'time_tracking_edit_threshold' ) ) ) { ?>
>> <tr <?php echo helper_alternate_class()
?>>
>> <td class="category">
>> <?php echo lang_get(
'time_tracking' ) ?>
>>  -421,6 +422,7 
>> </td>
>> </tr>
>> <?php } ?>
>> +<?php } ?>
>>
>>
>> <!-- Submit Button -->
>>
>>
>>
------------------------------------------------------------
-------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get
the chance to share
>> your
>> opinions on IT & business topics through brief
surveys - and earn cash
>> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> Mantisbt-cvs mailing list
>> Mantisbt-cvs lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mantisbt-c
vs
>>
>
>
------------------------------------------------------------
-------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the
chance to share
> your
> opinions on IT & business topics through brief
surveys - and earn cash
> http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Mantisbt-dev mailing list
> Mantisbt-dev lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mantisbt-d
ev
>
Regards,
David
---------------------------------------
Managing Director
+44 (0) 7866 262 398
BigSoft Limited
Reading, UK
http://www.bigsoft.co.uk/
a>
------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief surveys -
and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mantisbt-dev mailing list
Mantisbt-dev lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mantisbt-d
ev
|
|
[1-2]
|
|