module/Core/src/Core/Entity/FileEntity.php 1 location
|
@@ 282-292 (lines=11) @@
|
| 279 |
|
* |
| 280 |
|
* @return PermissionsInterface |
| 281 |
|
*/ |
| 282 |
|
public function getPermissions() |
| 283 |
|
{ |
| 284 |
|
if (!$this->permissions) { |
| 285 |
|
$perms = new Permissions(); |
| 286 |
|
if ($this->user instanceof UserInterface) { |
| 287 |
|
$perms->grant($this->user, PermissionsInterface::PERMISSION_ALL); |
| 288 |
|
} |
| 289 |
|
$this->setPermissions($perms); |
| 290 |
|
} |
| 291 |
|
return $this->permissions; |
| 292 |
|
} |
| 293 |
|
} |
module/Organizations/src/Organizations/Entity/Organization.php 1 location
|
@@ 450-458 (lines=9) @@
|
| 447 |
|
* |
| 448 |
|
* @return $this |
| 449 |
|
*/ |
| 450 |
|
public function setPermissions(PermissionsInterface $permissions) |
| 451 |
|
{ |
| 452 |
|
// Assure the user has always all rights. |
| 453 |
|
if ($this->user) { |
| 454 |
|
$permissions->grant($this->user, Permissions::PERMISSION_ALL); |
| 455 |
|
} |
| 456 |
|
$this->permissions = $permissions; |
| 457 |
|
|
| 458 |
|
return $this; |
| 459 |
|
} |
| 460 |
|
|
| 461 |
|
/** |