This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, 6.1 has been updated
       via  759dc63ebb1a43b3ccc3ff1dcdf0f9a32080cf97 (commit)
      from  d5f0cfcfcd0fb67f8757910ed43dc70faf4a3b33 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=759dc63ebb1a43b3ccc3ff1dcdf0f9a32080cf97

commit 759dc63ebb1a43b3ccc3ff1dcdf0f9a32080cf97
Author: Franck Villaume <[email protected]>
Date:   Sun Apr 29 12:54:09 2018 +0200

    tracker widget display: better handling for role condition

diff --git a/src/common/widget/Widget_TrackerComment.class.php 
b/src/common/widget/Widget_TrackerComment.class.php
index 3133612..b2ec058 100644
--- a/src/common/widget/Widget_TrackerComment.class.php
+++ b/src/common/widget/Widget_TrackerComment.class.php
@@ -111,7 +111,7 @@ class Widget_TrackerComment extends Widget {
                                $elementsLi[] = array('content' => 
util_make_link('#tabber-associations', $tabTitle, false, true));
                        }
                        $divContent = '';
-                       if (forge_check_perm('tracker', $atid, 'tech')) {
+                       if (session_loggedin() && forge_check_perm('tracker', 
$atid, 'tech')) {
                                $divContent .= html_e('strong', array(), _('Use 
Canned Response')._(':')).html_e('br').
                                                
$ath->cannedResponseBox('tracker-canned_response', 'xzxz', array('form' => 
'trackerform')).' 
'.util_make_link('/tracker/admin/?group_id='.$group_id.'&atid='.$ath->getID().'&add_canned=1',
 '('._('Admin').')').html_e('br').
                                                '<script 
type="text/javascript">//<![CDATA[
@@ -132,7 +132,7 @@ class Widget_TrackerComment extends Widget {
                                                        });
                                                //]]></script>';
                        }
-                       if (forge_check_perm('tracker', $atid, 'submit')) {
+                       if (session_loggedin() && forge_check_perm('tracker', 
$atid, 'submit')) {
                                $divContent .= html_e('strong', array(), 
_('Post Comment')._(':')).html_e('br').
                                                html_e('textarea', array('form' 
=> 'trackerform', 'id' => 'tracker-comment', 'name' => 'details', 'rows' => 7, 
'style' => 'width: 100%', 'title' => 
util_html_secure(html_get_tooltip_description('comment'))), '', false);
                        }
@@ -144,7 +144,7 @@ class Widget_TrackerComment extends Widget {
                        }
                }
                $attachmentContent = '';
-               if (forge_check_perm('tracker', $atid, 'submit')) {
+               if (($func == 'add' && forge_check_perm('tracker', $atid, 
'submit')) || ($func == 'detail' && session_loggedin() && 
forge_check_perm('tracker', $atid, 'submit'))) {
                        $attachmentContent .=  html_e('strong', array(), 
_('Attach Files')._(':')).' ('._('max upload size')._(': 
').human_readable_bytes(util_get_maxuploadfilesize()).')'.html_e('br');
                        for ($i = 0; $i < 5; $i++) {
                                $attachmentContent .= html_e('input', 
array('form' => 'trackerform', 'type' => 'file', 'name' => 'input_file'.$i, 
'size' => 30)).html_e('br');
@@ -181,7 +181,7 @@ class Widget_TrackerComment extends Widget {
                        }
                        if (forge_get_config('use_object_associations')) {
                                $associationContent = 
$ah->showAssociations('/tracker/?func=removeassoc&aid='.$ah->getID().'&group_id='.$group_id.'&atid='.$ath->getID());
-                               if (forge_check_perm('tracker', $atid, 'tech')) 
{
+                               if (session_loggedin() && 
forge_check_perm('tracker', $atid, 'tech')) {
                                        $associationContent .= 
$ah->showAddAssociations(false, 'trackerform');
                                }
                                $tabberContent .= html_e('div', array('id' => 
'tabber-associations', 'class' => 'tabbertab'), $associationContent);
@@ -189,7 +189,7 @@ class Widget_TrackerComment extends Widget {
                }
                $return .= html_e('div', array('id' => 'tabber'), 
$HTML->html_list($elementsLi).$tabberContent);
 
-               if (forge_check_perm('tracker', $atid, 'submit')) {
+               if (session_loggedin() && forge_check_perm('tracker', $atid, 
'submit')) {
                        $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 
'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the 
complete form'), 'onClick' => 'iefixform()')));
                }
                return $return;
diff --git a/src/common/widget/Widget_TrackerSummary.class.php 
b/src/common/widget/Widget_TrackerSummary.class.php
index 2e73027..ccb38f6 100644
--- a/src/common/widget/Widget_TrackerSummary.class.php
+++ b/src/common/widget/Widget_TrackerSummary.class.php
@@ -64,7 +64,7 @@ class Widget_TrackerSummary extends Widget {
                $fieldInFormula = $ath->getFieldsInFormula();
 
                $return = '';
-               if (!session_loggedin()) {
+               if ($func == 'add' && !session_loggedin()) {
                        $content = html_e('p', array('class' => 'warning_msg'), 
_('Please').' 
'.util_make_link('/account/login.php?return_to='.urlencode(getStringFromServer('REQUEST_URI')),
 _('login')));
                        $content .= _('If you <strong>cannot</strong> login, 
then enter your email address here')._(':').utils_requiredField();
                        $content .= html_e('p', array(), html_e('input', 
array('type' => 'email', 'name' => 'user_email', 'size' => 50, 'maxlength' => 
255, 'required' => 'required')));
@@ -115,7 +115,7 @@ class Widget_TrackerSummary extends Widget {
                        $return .= $HTML->listTableBottom();
 
                }
-               if (forge_check_perm('tracker', $atid, 'submit')) {
+               if (($func == 'add' && forge_check_perm('tracker', $atid, 
'submit')) || ($func == 'detail' && session_loggedin() && 
forge_check_perm('tracker', $atid, 'submit'))) {
                        $return .= $HTML->addRequiredFieldsInfoBox();
                        $return .= html_e('p', array('class' => 'middleRight'), 
html_e('input', array('form' => 'trackerform', 'type' => 'submit', 'name' => 
'submit', 'value' => _('Save Changes'), 'title' => _('Save is validating the 
complete form'), 'onClick' => 'iefixform()')));
                }

-----------------------------------------------------------------------

Summary of changes:
 src/common/widget/Widget_TrackerComment.class.php | 10 +++++-----
 src/common/widget/Widget_TrackerSummary.class.php |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to