From 964b60ddd2d8b63f525013aed5fd61aa471c409c Mon Sep 17 00:00:00 2001
From: Martin Haase <martin.haase@daasi.de>
Date: Fri, 13 May 2011 12:15:07 +0000
Subject: [PATCH] forgot this

git-svn-id: https://textgridlab.org/svn/textgrid/trunk/middleware/tgauth@9818 7c539038-3410-0410-b1ec-0f2a7bf1c452
---
 .../tgExtensions/Project.class.php                 | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/info.textgrid.middleware.tgauth.rbac/tgExtensions/Project.class.php b/info.textgrid.middleware.tgauth.rbac/tgExtensions/Project.class.php
index 5684444..cc8e31a 100755
--- a/info.textgrid.middleware.tgauth.rbac/tgExtensions/Project.class.php
+++ b/info.textgrid.middleware.tgauth.rbac/tgExtensions/Project.class.php
@@ -66,7 +66,7 @@ class Project extends RBACExtension {
     // If the roleName contains a DN that is directly under
     // the project-base-DN, then add the project-specific
     // permissions and operations
-    if( preg_match( "/^rbacName=TGPR[0-9]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i", $roleDn ) ) {
+    if( preg_match( "/^rbacName=TGPR-[^,]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i", $roleDn ) ) {
 
       $arrEntry = $inContext->getValue( "entry" );
 
@@ -98,17 +98,7 @@ class Project extends RBACExtension {
     $projectEntry = $inContext->getValue( "entry" );  // The entry itself
 
 
-    $file = fopen( "LOG/createMissingProjectRoleTree.debug", "a+" );
-    fwrite( $file, "\n/^\s*rbacName=TGPR[0-9]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i" . " ::: " . $projectDn . "\n" );
-    fclose( $file );
-
-
-    if( preg_match( "/^\s*rbacName=TGPR[0-9]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i", $projectDn ) ) {
-
-      $file = fopen( "LOG/createMissingProjectRoleTree.debug", "a+" );
-      fwrite( $file, "It is indeed a project!\n" );
-      fclose( $file );
-
+    if( preg_match( "/^\s*rbacName=TGPR-[^,]+\s*,\s*" . $this->conf->getValue( "project", "base" ) . "/i", $projectDn ) ) {
 
       // Create the other roles
       $this->rbac->addAscendant( $this->conf->getValue( "project", "observerRoleName" ), $projectDn );
-- 
GitLab