mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-12-06 11:22:41 +01:00
split principal types into different subclasses, added principal factory, implemented principal friendlyNames and FullHierarchyNames, added parentOrganizationId attribute to organizations
This commit is contained in:
parent
225072bff7
commit
89ff5415dd
15 changed files with 321 additions and 47 deletions
|
@ -31,11 +31,13 @@ class CreateOrganizationFolderMember extends BaseCommand {
|
|||
$principalType = PrincipalType::fromNameOrValue($input->getOption('principal-type'));
|
||||
$principalId = $input->getOption('principal-id');
|
||||
|
||||
$principal = $this->principalFactory->buildPrincipal($principalType, $principalId);
|
||||
|
||||
try {
|
||||
$member = $this->organizationFolderMemberService->create(
|
||||
organizationFolderId: $organizationFolderId,
|
||||
permissionLevel: $permissionLevel,
|
||||
principal: new Principal($principalType, $principalId),
|
||||
principal: $principal,
|
||||
);
|
||||
|
||||
$this->writeTableInOutputFormat($input, $output, [$this->formatTableSerializable($member)]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue