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.0 has been updated
       via  2a9a66a9e344e057d9e2e899d0b9420196a5e7ae (commit)
       via  d235264b03104086e4d7e9d268d9ee4fe8b01951 (commit)
      from  5bb286ef728ce19ae7da27be4d1116bf2d5c0b77 (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 -----------------------------------------------------------------
commit 2a9a66a9e344e057d9e2e899d0b9420196a5e7ae
Author: Sylvain Beucler <[email protected]>
Date:   Wed Apr 1 17:45:54 2015 +0200

    reactivity: SCM_REPO event when anonymous gains/loses access to a repo

diff --git a/src/common/include/RBAC.php b/src/common/include/RBAC.php
index 1ec670c..4f06188 100644
--- a/src/common/include/RBAC.php
+++ b/src/common/include/RBAC.php
@@ -324,6 +324,13 @@ abstract class BaseRole extends Error {
                                                       $reference,
                                                       $value)) ;
                $this->perms_array[$section][$reference] = $value;
+
+               # Change repo permissions when we change anonymous access
+               $anon = RoleAnonymous::getInstance();
+               if ($section == 'scm' && $this->getID() == $anon->getID()) {
+                               $systasksq = new SysTasksQ();
+                               $systasksq->add(SYSTASK_CORE, 'SCM_REPO', 
$reference);
+               }
        }
 
        function getSettingsForProject ($project) {
@@ -845,6 +852,7 @@ abstract class BaseRole extends Error {
                //                      
db_execute('delete_from_pfo_role_setting', array($role_id, $sect, $refid));
 
                // Insert new/changed permissions
+               $anon = RoleAnonymous::getInstance();
                foreach ($data as $sect => &$refs) {
                        foreach ($refs as $refid => $value) {
                                if (!isset($this->perms_array[$sect][$refid])) {
@@ -857,6 +865,12 @@ abstract class BaseRole extends Error {
                                                   array($role_id, $sect, 
$refid, $value));
                                }
                        }
+
+                       # Change repo permissions when we change anonymous 
access
+                       if ($sect == 'scm' && $this->getID() == $anon->getID()) 
{
+                                       $systasksq = new SysTasksQ();
+                                       $systasksq->add(SYSTASK_CORE, 
'SCM_REPO', $refid);
+                       }
                }
 
                db_unprepare ('insert_into_pfo_role_setting');

commit d235264b03104086e4d7e9d268d9ee4fe8b01951
Author: Sylvain Beucler <[email protected]>
Date:   Wed Apr 1 16:47:34 2015 +0200

    scm browser: use 'scm_host' rather than project 'Box', which is obsolete 
and causes issues when testing production data in development environment

diff --git a/src/plugins/scmgit/common/GitPlugin.class.php 
b/src/plugins/scmgit/common/GitPlugin.class.php
index a92e6fb..ba7beb8 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -293,12 +293,12 @@ control over it to the project's administrator.");
 
                        if ($project->enableAnonSCM()) {
                                $protocol = forge_get_config('use_ssl', 
'scmgit')? 'https' : 'http';
-                               $box = $this->getBoxForProject($project);
+                               $box = forge_get_config('scm_host');
                                $iframesrc = 
"$protocol://$box/anonscm/gitweb/?p=$repo";
                        } elseif (session_loggedin()) {
                                $logged_user = 
user_get_object(user_getid())->getUnixName();
                                $protocol = forge_get_config('use_ssl', 
'scmgit')? 'https' : 'http';
-                               $box = $this->getBoxForProject($project);
+                               $box = forge_get_config('scm_host');
                                $iframesrc = 
"$protocol://$box/authscm/$logged_user/gitweb/?p=$repo";
                        }
                        if ($params['commit']) {
diff --git a/src/www/scm/viewvc.php b/src/www/scm/viewvc.php
index 072f285..2822119 100644
--- a/src/www/scm/viewvc.php
+++ b/src/www/scm/viewvc.php
@@ -96,7 +96,7 @@ if ($external_scm) {
                $server_script = '/authscm/'.$u->getUnixName().'/viewvc';
        // pass the parameters passed to this script to the remote script in 
the same fashion
        $protocol = forge_get_config('use_ssl', 'scmsvn')? 'https://' : 
'http://';
-       $script_url = $protocol . $scm_box . $server_script
+       $script_url = $protocol . forge_get_config('scm_host') . $server_script
                . (isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : '/')
                . '?' . $_SERVER["QUERY_STRING"];
        if ($redirect) {

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

Summary of changes:
 src/common/include/RBAC.php                   |   14 ++++++++++++++
 src/plugins/scmgit/common/GitPlugin.class.php |    4 ++--
 src/www/scm/viewvc.php                        |    2 +-
 3 files changed, 17 insertions(+), 3 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