View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0011923 | mantisbt | other | public | 2010-05-12 15:53 | 2014-09-23 18:05 |
Reporter | atrol | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.1 | ||||
Target Version | 1.2.9 | Fixed in Version | 1.2.9 | ||
Summary | 0011923: Wrong display of user's access level in notes | ||||
Description | After an issue is moved from projekt A to B the display of access level in notes is (@0@) if the user who added to note has no rights for the new project. | ||||
Steps To Reproduce |
Result: Display of access level in note right beside username U1 is (@0@) | ||||
Additional Information | Seems that this piece of code is the problem if I undertand right, the returnvalue of access_get_project_level will be ANYBODY (=0) in this case Adding a value for 0 in access_levels would certainly fix this problem, but maybe will have unwanted side effects. Possibly this is at least a workaround: More clean?: ANYBODY access level is introduced system wide, so that every user is per default ANYBODY and has ANYBODY access level for private projects. (which means has no rights) | ||||
Tags | No tags attached. | ||||
Attached Files | 11923-bugnote-access_level-0.patch (1,075 bytes)
From a746e1d434882be3775c9a4722aed2ee40781e16 Mon Sep 17 00:00:00 2001 From: Lapinkiller <lapinkiller@hotmail.fr> Date: Thu, 28 Jul 2011 14:33:14 +0200 Subject: [PATCH] bugnote access_level=0 mantis#11923 --- bugnote_view_inc.php | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/bugnote_view_inc.php b/bugnote_view_inc.php index 9332839..0f65440 100644 --- a/bugnote_view_inc.php +++ b/bugnote_view_inc.php @@ -119,8 +119,12 @@ $num_notes = count( $t_bugnotes ); <span class="small"><?php if ( user_exists( $t_bugnote->reporter_id ) ) { $t_access_level = access_get_project_level( null, (int)$t_bugnote->reporter_id ); - echo '(', get_enum_element( 'access_levels', $t_access_level ), ')'; + //No label if access_level is 0 + if($t_access_level>0 && $t_access_level){ + echo '(', get_enum_element( 'access_levels', $t_access_level ), ')'; + } } + ?></span> <?php if ( VS_PRIVATE == $t_bugnote->view_state ) { ?> <span class="small">[ <?php echo lang_get( 'private' ) ?> ]</span> -- 1.7.6.msysgit.0 | ||||
Good catch, I'll fix this shortly. |
|
On my installation i have already fix it. There is the same problem when an user have been removed from project, in this case, i don't show the inexistent "@0@" access level patch attached, i cannot submit a push from git because of this f**** proxy :@ |
|
Thanks for your contribution |
|
Lapinkiller, I have applied your patch to 1.2.x and master, with some minor changes and a more descriptive commit message. Thanks for your contribution ! |
|
Marking as 'acknowledged' not resolved/closed to track that change gets ported to master-2.0.x branch |
|
MantisBT: master b41fe484 2011-07-28 01:33 Details Diff |
Fix 0011923: incorrect display of access level in notes Do not display the access level in bugnotes when it is 0 (ANYBODY). Prior to this, the access level display in bugnotes was (@0@) if the user who added the note did not have access to the project. This situation can happen when an issue is moved to a private project, or when a user's rights to a private project are revoked. Signed-off-by: Damien Regad <damien.regad@merckgroup.com> |
Affected Issues 0011923 |
|
mod - bugnote_view_inc.php | Diff File | ||
MantisBT: master-1.2.x 23ef2964 2011-07-28 01:33 Details Diff |
Fix 0011923: incorrect display of access level in notes Do not display the access level in bugnotes when it is 0 (ANYBODY). Prior to this, the access level display in bugnotes was (@0@) if the user who added the note did not have access to the project. This situation can happen when an issue is moved to a private project, or when a user's rights to a private project are revoked. Signed-off-by: Damien Regad <damien.regad@merckgroup.com> |
Affected Issues 0011923 |
|
mod - bugnote_view_inc.php | Diff File |