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
|
@@ 321-329 (lines=9) @@
|
| 318 |
|
* |
| 319 |
|
* @return $this |
| 320 |
|
*/ |
| 321 |
|
public function setPermissions(PermissionsInterface $permissions) |
| 322 |
|
{ |
| 323 |
|
// Assure the user has always all rights. |
| 324 |
|
if ($this->user) { |
| 325 |
|
$permissions->grant($this->user, Permissions::PERMISSION_ALL); |
| 326 |
|
} |
| 327 |
|
$this->permissions = $permissions; |
| 328 |
|
return $this; |
| 329 |
|
} |
| 330 |
|
|
| 331 |
|
/** |
| 332 |
|
* Gets the Permissions Resource ID |