Conversation
lib/Service/ContextService.php
Outdated
| $newContext->setName($context['name'] ?? ''); | ||
| $newContext->setIcon($context['iconName'] ?? ''); | ||
| $newContext->setDescription($context['description'] ?? ''); | ||
| $newContext->setOwnerId($context['owner'] ?? ''); |
There was a problem hiding this comment.
If we import, do we set the old owner id? Or would be be needed to change this to the current user id of the importer instead? Same probably applies to other importers
There was a problem hiding this comment.
@juliusknorr this was actually one of the final fixes im making, im going to actually check if the user exist and if not then use current logged in user, what do you think about that? or should we go straight with the current user?
There was a problem hiding this comment.
We should always use the user that is importing as the new owner (as I assume only your own tables/context are exported). The current logged in user may not work as I assume it is importing in a background job?
But I would guess there is a way to get the "target" user as part of the import process of the user_migration app
There was a problem hiding this comment.
understandable, i'm currently working on that.
There was a problem hiding this comment.
it's applied so the new owner is current user.
lib/TablesMigrator.php
Outdated
| public function __construct( | ||
| IL10N $l10n, | ||
| TableMapper $tableMapper, | ||
| ColumnMapper $columnMapper, | ||
| RowSleeveMapper $rowSleeveMapper, | ||
| ViewMapper $viewMapper, | ||
| ContextMapper $contextMapper, | ||
| ShareMapper $shareMapper, | ||
| ContextNodeRelationMapper $contextNodeRelationMapper, | ||
| FavoritesService $favoritesService, |
There was a problem hiding this comment.
Add ability to export/import user tables.