Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Command/CirclesConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:manage:config')
->setDescription('edit config/type of a Circle')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the circle')
->setDescription('edit config/type of a Team')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the team')
->addArgument(
'config', InputArgument::IS_ARRAY,
'list of value to change in the configuration of the Circle'
'list of value to change in the configuration of the Team'
)
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
->addOption('initiator-type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0')
Expand Down
10 changes: 5 additions & 5 deletions lib/Command/CirclesCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:manage:create')
->setDescription('create a new circle')
->addArgument('owner', InputArgument::REQUIRED, 'owner of the circle')
->addArgument('name', InputArgument::REQUIRED, 'name of the circle')
->addOption('personal', '', InputOption::VALUE_NONE, 'create a personal circle')
->addOption('local', '', InputOption::VALUE_NONE, 'create a local circle')
->setDescription('create a new team')
->addArgument('owner', InputArgument::REQUIRED, 'owner of the team')
->addArgument('name', InputArgument::REQUIRED, 'name of the team')
->addOption('personal', '', InputOption::VALUE_NONE, 'create a personal team')
->addOption('local', '', InputOption::VALUE_NONE, 'create a local team')
->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception')
->addOption(
'type', '', InputOption::VALUE_REQUIRED, 'type of the owner',
Expand Down
6 changes: 3 additions & 3 deletions lib/Command/CirclesDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:manage:details')
->setDescription('get details about a circle by its ID')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the circle')
->addOption('instance', '', InputOption::VALUE_REQUIRED, 'Instance of the circle', '')
->setDescription('get details about a team by its ID')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the team')
->addOption('instance', '', InputOption::VALUE_REQUIRED, 'Instance of the team', '')
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
->addOption('initiator-type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0')
->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception');
Expand Down
4 changes: 2 additions & 2 deletions lib/Command/CirclesEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:manage:edit')
->setDescription('edit displayName or description of a Circle')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the circle')
->setDescription('edit displayName or description of a Team')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the team')
->addArgument('edit', InputArgument::REQUIRED, 'displayName or description')
->addArgument('value', InputArgument::REQUIRED, 'new value')
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
Expand Down
4 changes: 2 additions & 2 deletions lib/Command/CirclesJoin.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:manage:join')
->setDescription('emulate a user joining a Circle')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the circle')
->setDescription('emulate a user joining a Team')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the team')
->addArgument('initiator', InputArgument::REQUIRED, 'initiator to the request')
->addOption('type', '', InputOption::VALUE_REQUIRED, 'type of the initiator', '0')
->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception');
Expand Down
4 changes: 2 additions & 2 deletions lib/Command/CirclesLeave.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:manage:leave')
->setDescription('simulate a user joining a Circle')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the circle')
->setDescription('simulate a user joining a Team')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the team')
->addArgument('initiator', InputArgument::REQUIRED, 'initiator to the request')
->addOption('type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0')
->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception');
Expand Down
18 changes: 9 additions & 9 deletions lib/Command/CirclesList.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:manage:list')
->setDescription('listing current circles')
->addOption('instance', '', InputOption::VALUE_REQUIRED, 'Instance of the circle', '')
->setDescription('listing current teams')
->addOption('instance', '', InputOption::VALUE_REQUIRED, 'Instance of the team', '')
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
->addOption('initiator-type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0')
->addOption('member', '', InputOption::VALUE_REQUIRED, 'search for member', '')
->addOption('def', '', InputOption::VALUE_NONE, 'display complete circle configuration')
->addOption('def', '', InputOption::VALUE_NONE, 'display complete team configuration')
->addOption('display-name', '', InputOption::VALUE_NONE, 'display the displayName')
->addOption('personal', '', InputOption::VALUE_NONE, 'include Personal Circles')
->addOption('system', '', InputOption::VALUE_NONE, 'include System Circles')
->addOption('hidden', '', InputOption::VALUE_NONE, 'include Hidden Circles')
->addOption('backend', '', InputOption::VALUE_NONE, 'include Backend Circles')
->addOption('single', '', InputOption::VALUE_NONE, 'returns only Single Circles')
->addOption('all', '', InputOption::VALUE_NONE, 'include all Circles');
->addOption('personal', '', InputOption::VALUE_NONE, 'include Personal Teams')
->addOption('system', '', InputOption::VALUE_NONE, 'include System Teams')
->addOption('hidden', '', InputOption::VALUE_NONE, 'include Hidden Teams')
->addOption('backend', '', InputOption::VALUE_NONE, 'include Backend Teams')
->addOption('single', '', InputOption::VALUE_NONE, 'returns only Single Teams')
->addOption('all', '', InputOption::VALUE_NONE, 'include all Teams');
}


Expand Down
4 changes: 2 additions & 2 deletions lib/Command/CirclesSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:manage:setting')
->setDescription('edit setting for a Circle')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the circle')
->setDescription('edit setting for a Team')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the team')
->addArgument('setting', InputArgument::OPTIONAL, 'setting to edit', '')
->addArgument('value', InputArgument::OPTIONAL, 'value', '')
->addOption('unset', '', InputOption::VALUE_NONE, 'unset the setting')
Expand Down
6 changes: 3 additions & 3 deletions lib/Command/CirclesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ private function testCirclesApp() {
$this->t('Building Local Database');
$this->buildingLocalDatabase();

$this->t('Testing Basic Circle Creation');
$this->t('Testing Basic Team Creation');
$this->circleCreation001();

$this->t('Adding local users and moderators');
Expand Down Expand Up @@ -714,7 +714,7 @@ private function buildingLocalDatabase() {
* @throws ItemNotFoundException
*/
private function circleCreation001() {
$this->p('Creating basic circle');
$this->p('Creating basic team');

$localInstanceId = 'global-scale-1';
$name = self::$TEST_CIRCLES[0];
Expand Down Expand Up @@ -1085,7 +1085,7 @@ private function getSingleCircleForMember(array $circles, string $userId, string
}
}

throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Circle');
throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Team');
}


Expand Down
4 changes: 2 additions & 2 deletions lib/Command/MembersAdd.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:members:add')
->setDescription('Add a member to a Circle')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the circle')
->setDescription('Add a member to a Team')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the team')
->addArgument('user', InputArgument::REQUIRED, 'username of the member')
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
->addOption('initiator-type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0')
Expand Down
6 changes: 3 additions & 3 deletions lib/Command/MembersLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:members:level')
->setDescription('Change the level of a member from a Circle')
->addArgument('member_id', InputArgument::REQUIRED, 'ID of the member from the Circle')
->addOption('circle', '', InputOption::VALUE_REQUIRED, 'ID of the circle', '')
->setDescription('Change the level of a member from a Team')
->addArgument('member_id', InputArgument::REQUIRED, 'ID of the member from the Team')
->addOption('circle', '', InputOption::VALUE_REQUIRED, 'ID of the team', '')
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
->addOption('initiator-type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0')
->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception')
Expand Down
6 changes: 3 additions & 3 deletions lib/Command/MembersList.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:members:list')
->setDescription('listing Members from a Circle')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the circle')
->addOption('instance', '', InputOption::VALUE_REQUIRED, 'Instance of the circle', '')
->setDescription('listing Members from a Team')
->addArgument('circle_id', InputArgument::REQUIRED, 'ID of the team')
->addOption('instance', '', InputOption::VALUE_REQUIRED, 'Instance of the team', '')
->addOption('inherited', '', InputOption::VALUE_NONE, 'Display all inherited members')
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
->addOption('initiator-type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0')
Expand Down
4 changes: 2 additions & 2 deletions lib/Command/MembersRemove.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public function __construct(
protected function configure() {
parent::configure();
$this->setName('circles:members:remove')
->setDescription('remove a member from a circle')
->addArgument('member_id', InputArgument::REQUIRED, 'ID of the member from the Circle')
->setDescription('remove a member from a team')
->addArgument('member_id', InputArgument::REQUIRED, 'ID of the member from the Team')
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
->addOption('initiator-type', '', InputOption::VALUE_REQUIRED, 'set initiator type', '0');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/MembersSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(SearchService $searchService, ConfigService $configS
protected function configure() {
parent::configure();
$this->setName('circles:members:search')
->setDescription('Change the level of a member from a Circle')
->setDescription('Change the level of a member from a Team')
->addArgument('term', InputArgument::REQUIRED, 'term to search')
->addOption('initiator', '', InputOption::VALUE_REQUIRED, 'set an initiator to the request', '')
->addOption('status-code', '', InputOption::VALUE_NONE, 'display status code on exception');
Expand Down
2 changes: 1 addition & 1 deletion lib/Command/MigrateCustomGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function migrateTeams(): void {
$circle = $this->circlesManager->createCircle($name);
} catch (\Exception $e) {
$this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error> with data ' . json_encode($rowCG));
$this->logger->log(2, 'error while creating circle', ['exception' => $e]);
$this->logger->log(2, 'error while creating team', ['exception' => $e]);
$this->circlesManager->stopSession();
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/DeprecatedCircle.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public static function fromJSON($json) {
public function cantBePersonal() {
if ($this->getType() === self::CIRCLES_PERSONAL) {
throw new CircleTypeNotValidException(
$this->l10n->t('This feature is not available for personal circles')
$this->l10n->t('This feature is not available for personal teams')
);
}
}
Expand Down
8 changes: 4 additions & 4 deletions lib/Model/DeprecatedMember.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ public function levelHasToBeEditable() {
public function hasToBeAbleToJoinTheCircle() {
if ($this->getLevel() > 0) {
throw new MemberAlreadyExistsException(
$this->l10n->t('You are already a member of this circle')
$this->l10n->t('You are already a member of this team')
);
}

if ($this->getStatus() === DeprecatedMember::STATUS_BLOCKED) {
throw new MemberIsBlockedException(
$this->l10n->t('You have been blocked from this circle')
$this->l10n->t('You have been blocked from this team')
);
}
}
Expand All @@ -222,13 +222,13 @@ public function hasToBeAbleToJoinTheCircle() {
public function hasToBeInviteAble() {
if ($this->getLevel() > 0) {
throw new MemberAlreadyExistsException(
$this->l10n->t('The account is already a member of this circle')
$this->l10n->t('The account is already a member of this team')
);
}

if ($this->getStatus() === DeprecatedMember::STATUS_INVITED) {
throw new MemberAlreadyExistsException(
$this->l10n->t('The account has already been invited into this circle')
$this->l10n->t('The account has already been invited into this team')
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/Mount.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ public function toMount(): array {
*/
public function fromShare(ShareWrapper $wrappedShare) {
if (!$wrappedShare->hasCircle()) {
throw new CircleNotFoundException('ShareWrapper has no Circle');
throw new CircleNotFoundException('ShareWrapper has no Team');
}

$circle = $wrappedShare->getCircle();
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/FederatedEventService.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function confirmInitiator(FederatedEvent $event, bool $local = false): vo

if (!$event->canBypass(FederatedEvent::BYPASS_INITIATORMEMBERSHIP)
&& $circle->getInitiator()->getLevel() < Member::LEVEL_MEMBER) {
throw new InitiatorNotConfirmedException('Initiator must be a member of the Circle');
throw new InitiatorNotConfirmedException('Initiator must be a member of the Team');
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Service/RemoteDownstreamService.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function requestedEvent(FederatedEvent $event): void {
if ($event->isLimitedToInstanceWithMember()) {
$instances = $this->memberRequest->getMemberInstances($event->getCircle()->getSingleId());
if (!in_array($event->getSender(), $instances)) {
throw new FederatedEventException('Instance have no members in this Circle');
throw new FederatedEventException('Instance have no members in this Team');
}
}

Expand Down Expand Up @@ -202,7 +202,7 @@ private function confirmCircle(FederatedEvent $event): void {
return;
}

throw new FederatedEventDSyncException('Could not verify Circle');
throw new FederatedEventDSyncException('Could not verify Team');
}

/**
Expand Down
24 changes: 12 additions & 12 deletions lib/StatusCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ class StatusCode {
];

public static $CIRCLE_JOIN = [
121 => 'Circle is full',
121 => 'Team is full',
122 => 'You are already a member',
123 => 'Already requesting to join the circle',
124 => 'Circle is closed'
123 => 'Already requesting to join the team',
124 => 'Team is closed'
];

public static $CIRCLE_LEAVE = [
Expand All @@ -39,22 +39,22 @@ class StatusCode {

public static $MEMBER_ADD = [
120 => 'Unknown entity',
121 => 'Circle is full',
122 => 'Already member of the circle',
123 => 'Already invited into the circle',
121 => 'Team is full',
122 => 'Already member of the team',
123 => 'Already invited into the team',
124 => 'Member is blocked',
125 => 'The designed circle cannot be added',
126 => 'Circle only accepts local users',
127 => 'Remote Users are not accepted in a non-federated Circle',
128 => 'Cannot add Circle as its own Member',
125 => 'The designed team cannot be added',
126 => 'Team only accepts local users',
127 => 'Remote Users are not accepted in a non-federated Team',
128 => 'Cannot add Team as its own Member',
129 => 'Member does not contains a patron',
130 => 'Member is invited by an entity that does not belongs to the instance at the origin of the request',
131 => 'Member is a non-local Circle',
131 => 'Member is a non-local Team',
132 => 'Member type not allowed'
];

public static $CIRCLE_DESTROY = [
120 => 'Circle is managed from an other app'
120 => 'Team is managed from an other app'
];

public static $MEMBER_LEVEL = [
Expand Down
Loading