| @@ 667-674 (lines=8) @@ | ||
| 664 | * |
|
| 665 | * @throws MemberIsNotOwnerException |
|
| 666 | */ |
|
| 667 | public function hasToBeOwner(DeprecatedMember $member) { |
|
| 668 | if (!$this->groupManager->isAdmin($this->userId) |
|
| 669 | && $member->getLevel() < DeprecatedMember::LEVEL_OWNER) { |
|
| 670 | throw new MemberIsNotOwnerException( |
|
| 671 | $this->l10n->t('This member is not the owner of the circle') |
|
| 672 | ); |
|
| 673 | } |
|
| 674 | } |
|
| 675 | ||
| 676 | ||
| 677 | /** |
|
| @@ 684-691 (lines=8) @@ | ||
| 681 | * |
|
| 682 | * @throws MemberIsNotOwnerException |
|
| 683 | */ |
|
| 684 | public function hasToBeAdmin(DeprecatedMember $member) { |
|
| 685 | if (!$this->groupManager->isAdmin($member->getUserId()) |
|
| 686 | && $member->getLevel() < DeprecatedMember::LEVEL_ADMIN) { |
|
| 687 | throw new MemberIsNotOwnerException( |
|
| 688 | $this->l10n->t('This member is not an admin of the circle') |
|
| 689 | ); |
|
| 690 | } |
|
| 691 | } |
|
| 692 | ||
| 693 | } |
|
| 694 | ||