mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
fix(files_sharing): bring back owner and ownerDisplayName initial state
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
This commit is contained in:
parent
f26dc79480
commit
bcc8de0c9d
2 changed files with 7 additions and 1 deletions
|
|
@ -70,8 +70,10 @@ class DefaultPublicShareTemplateProvider implements IPublicShareTemplateProvider
|
|||
|
||||
$ownerNameProperty = $ownerAccount->getProperty(IAccountManager::PROPERTY_DISPLAYNAME);
|
||||
if ($ownerNameProperty->getScope() === IAccountManager::SCOPE_PUBLISHED) {
|
||||
$ownerName = $owner->getDisplayName();
|
||||
$ownerId = $owner->getUID();
|
||||
$ownerName = $owner->getDisplayName();
|
||||
$this->initialState->provideInitialState('owner', $ownerId);
|
||||
$this->initialState->provideInitialState('ownerDisplayName', $ownerName);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -330,6 +330,8 @@ class ShareControllerTest extends \Test\TestCase {
|
|||
'filename' => $filename,
|
||||
'view' => $view,
|
||||
'fileId' => 111,
|
||||
'owner' => 'ownerUID',
|
||||
'ownerDisplayName' => 'ownerDisplay',
|
||||
];
|
||||
|
||||
$response = $this->shareController->showShare();
|
||||
|
|
@ -470,6 +472,8 @@ class ShareControllerTest extends \Test\TestCase {
|
|||
'filename' => $filename,
|
||||
'view' => 'public-file-drop',
|
||||
'disclaimer' => 'My disclaimer text',
|
||||
'owner' => 'ownerUID',
|
||||
'ownerDisplayName' => 'ownerDisplay',
|
||||
];
|
||||
|
||||
$response = $this->shareController->showShare();
|
||||
|
|
|
|||
Loading…
Reference in a new issue