eZ/Publish/Core/Repository/Permission/CachedPermissionService.php 1 location
|
@@ 130-142 (lines=13) @@
|
| 127 |
|
/** |
| 128 |
|
* @internal For internal use only, do not depend on this method. |
| 129 |
|
*/ |
| 130 |
|
public function sudo(\Closure $callback, RepositoryInterface $outerRepository) |
| 131 |
|
{ |
| 132 |
|
++$this->sudoNestingLevel; |
| 133 |
|
try { |
| 134 |
|
$returnValue = $this->permissionResolver->sudo($callback, $outerRepository); |
| 135 |
|
} catch (Exception $e) { |
| 136 |
|
--$this->sudoNestingLevel; |
| 137 |
|
throw $e; |
| 138 |
|
} |
| 139 |
|
--$this->sudoNestingLevel; |
| 140 |
|
|
| 141 |
|
return $returnValue; |
| 142 |
|
} |
| 143 |
|
} |
| 144 |
|
|
eZ/Publish/Core/Repository/Permission/PermissionResolver.php 1 location
|
@@ 252-265 (lines=14) @@
|
| 249 |
|
* |
| 250 |
|
* @return mixed |
| 251 |
|
*/ |
| 252 |
|
public function sudo(\Closure $callback, RepositoryInterface $outerRepository) |
| 253 |
|
{ |
| 254 |
|
++$this->sudoNestingLevel; |
| 255 |
|
try { |
| 256 |
|
$returnValue = $callback($outerRepository); |
| 257 |
|
} catch (Exception $e) { |
| 258 |
|
--$this->sudoNestingLevel; |
| 259 |
|
throw $e; |
| 260 |
|
} |
| 261 |
|
|
| 262 |
|
--$this->sudoNestingLevel; |
| 263 |
|
|
| 264 |
|
return $returnValue; |
| 265 |
|
} |
| 266 |
|
} |
| 267 |
|
|