-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preset: fix: adding/removing global template not reflected in sidebar #4564
Conversation
0d2fba6
to
b8028ec
Compare
@@ -996,7 +996,7 @@ private function generateSettingToken(string $userId): string { | |||
private function generateSettings(string $userId, string $type): array { | |||
$nextcloudUrl = $this->appConfig->getNextcloudUrl() ?: trim($this->urlGenerator->getAbsoluteURL(''), '/'); | |||
$uri = $nextcloudUrl . '/index.php/apps/richdocuments/wopi/settings' . '?type=' . $type . '&access_token=' . $this->generateSettingToken($userId) . '&fileId=' . '-1'; | |||
$etag = $this->settingsService->getFolderEtag($type); | |||
$etag = $this->settingsService->getFolderEtag($type) . $this->settingsService->getPresentationFolderEtag($type, $userId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a condition for guest users: if the user is a guest, then do not generate getPresentationFolderEtag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think we should change the method to also allow null for the userId, and not set it to a string in
Using user ids that are non existing for non-logged in users may lead to more problems on other parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juliusknorr make sense
b8028ec
to
d80b3f1
Compare
d80b3f1
to
45f4b7f
Compare
/backport to stable31 |
@Rash419 I've invited you as a contributor to the repo so CI will run automatically next time you push and you can push a branch directly which makes collaboration a bit easier :) |
86f2e25
to
257ffb3
Compare
- this patch appends the presentation template folder etag to shared setting etag so that COOL can detect changes - this patch also update the etag of global templates folder when template is added or removed by admin Signed-off-by: Rashesh Padia <[email protected]>
257ffb3
to
a7af37a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @Rash419 :)
I'll try to create a separate PR to resolve Julius's comment. https://github.com/nextcloud/richdocuments/pull/4564/files#r1988926909
Checklist