@@ -75,9 +75,9 @@ private function isUserGranted($requestedGrants, $uri, $webId) {
7575 $ path = str_replace ($ this ->basePath , '' , $ path );
7676 }
7777
78- //error_log("REQUESTED GRANT: " . join(" or ", $requestedGrants) . " on $uri");
78+ // error_log("REQUESTED GRANT: " . join(" or ", $requestedGrants) . " on $uri");
7979 $ grants = $ this ->getUserGrants ($ path , $ webId );
80- //error_log("GRANTED GRANTS for $webId: " . json_encode($grants));
80+ // error_log("GRANTED GRANTS for $webId: " . json_encode($grants));
8181 if (is_array ($ grants )) {
8282 foreach ($ requestedGrants as $ requestedGrant ) {
8383 if ($ grants ['accessTo ' ] && $ grants ['accessTo ' ][$ requestedGrant ] && $ this ->arePathsEqual ($ grants ['accessTo ' ][$ requestedGrant ], $ uri )) {
@@ -132,7 +132,7 @@ private function getUserGrants($resourcePath, $webId) {
132132 $ acl = $ this ->filesystem ->read ($ aclPath );
133133
134134 $ graph = new \EasyRdf_Graph ();
135- $ graph ->parse ($ acl , Format::TURTLE , $ _SERVER [ ' REQUEST_SCHEME ' ] . ":// " . $ _SERVER [ ' SERVER_NAME ' ] );
135+ $ graph ->parse ($ acl , Format::TURTLE , $ this -> baseUrl . "/ " );
136136
137137 // error_log("GET GRANTS for $webId");
138138
@@ -172,7 +172,7 @@ private function getOriginGrants($resourcePath, $origin) {
172172 $ acl = $ this ->filesystem ->read ($ aclPath );
173173
174174 $ graph = new \EasyRdf_Graph ();
175- $ graph ->parse ($ acl , Format::TURTLE , $ _SERVER [ ' REQUEST_SCHEME ' ] . ":// " . $ _SERVER [ ' SERVER_NAME ' ] );
175+ $ graph ->parse ($ acl , Format::TURTLE , $ this -> baseUrl . "/ " );
176176
177177 // error_log("GET GRANTS for $origin");
178178
@@ -384,7 +384,8 @@ private function getPublicGrants($resourcePath) {
384384 $ acl = $ this ->filesystem ->read ($ aclPath );
385385
386386 $ graph = new \EasyRdf_Graph ();
387- $ graph ->parse ($ acl , Format::TURTLE , $ _SERVER ['REQUEST_SCHEME ' ] . ":// " . $ _SERVER ['SERVER_NAME ' ]);
387+
388+ $ graph ->parse ($ acl , Format::TURTLE , $ this ->baseUrl . "/ " );
388389
389390 $ grants = array ();
390391
0 commit comments