Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 894fdae

Browse files
committed
Fix workspaces securityScope() for templates that predefine a Path (or Container) value.
1 parent 58d0fae commit 894fdae

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

core/src/core/classes/class.Repository.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,15 @@ public function getDescription( $public = false, $ownerLabel = null )
616616
*/
617617
public function securityScope()
618618
{
619+
if($this->hasParent()){
620+
$parentRepo = ConfService::getRepositoryById($this->getParentId());
621+
if(!empty($parentRepo) && $parentRepo->isTemplate){
622+
$path = $parentRepo->getOption("PATH", true);
623+
$container = $parentRepo->getOption("CONTAINER", true);
624+
// If path is set in the template, compute identifier from the template path.
625+
if(!empty($path) || !empty($container)) return $parentRepo->securityScope();
626+
}
627+
}
619628
$path = $this->getOption("CONTAINER", true);
620629
if(!empty($path)){
621630
if(strpos($path, "AJXP_USER") !== false) return "USER";

0 commit comments

Comments
 (0)