Skip to content
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

Only register Maps plugin when allowed to use Talk #8587

Merged

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Jan 23, 2023

πŸ–ΌοΈ Screenshots

🏚️ Before 🏑 After
Bildschirmfoto vom 2023-01-23 20-40-20 Bildschirmfoto vom 2023-01-23 20-41-14
Clicking results in 403 No click, no error

Steps

diff --git a/lib/Files/TemplateLoader.php b/lib/Files/TemplateLoader.php
index c129c1854..297a214ae 100644
--- a/lib/Files/TemplateLoader.php
+++ b/lib/Files/TemplateLoader.php
@@ -95,7 +95,9 @@ class TemplateLoader implements IEventListener {
 
 		Util::addStyle(Application::APP_ID, 'At');
 		Util::addStyle(Application::APP_ID, 'icons');
-		Util::addScript(Application::APP_ID, 'talk-files-sidebar');
+		if (strpos(\OC::$server->getRequest()->getPathInfo(), '/apps/maps') !== 0)
+			Util::addScript(Application::APP_ID, 'talk-files-sidebar');
+		}
 
 		if ($user instanceof IUser) {
 			$this->publishInitialStateForUser($user, $this->rootFolder, $this->appManager);
  • Restrict usage of talk to a group you are not a member of
  • Go to the maps app
  • Rightclick

🏁 Checklist

Signed-off-by: Joas Schilling <coding@schilljs.com>
Copy link

@tacruc tacruc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@nickvergessen
Copy link
Member Author

/backport to stable25

@nickvergessen nickvergessen merged commit 6308445 into master Jan 24, 2023
@nickvergessen nickvergessen deleted the bugfix/noid/only-register-maps-interaction-when-allowed branch January 24, 2023 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug feature: integration πŸ“¦ Integration with 3rd party (chat) service
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants