-
- Notifications
You must be signed in to change notification settings - Fork 492
Exposing Whitelisted Protocols to User Settings #1401
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
base: main
Are you sure you want to change the base?
Conversation
bf9e06c to 6edcbb3 Compare | Thanks! Could you please update your commit message to match the commit style guidelines? |
| Do not close and reopen multiple pull requests for the same thing, even to fix the commit structure; you can always fix the commit structure by rebasing and force-pushing your existing branch. |
6edcbb3 to 084620f Compare | I adjusted the commit message to match the style guide. |
| Is there anything left to do on this PR? |
87f4cff to f56c2d0 Compare f56c2d0 to d270d56 Compare f21fa7d to dfe3839 Compare | @andersk @timabbott can you take a look if there's anything missing here that avoid a merge? |
| I think we'd need documentation for how users can decide which protocols they can safely add there. |
Totally makes sense, i'm just unsure where to document the setting.json 's new key. Could you point me to where i shall add the information then i'm happy to add it there too |
| A new file seems fine. I'd call it |
e333a68 to d1b0d88 Compare | Allright i added a customize-link-protocols.md to docs/howto :) |
3158084 to d244c9c Compare bab7c2a to eeb0b1a Compare 5de33ef to bab7c2a Compare bab7c2a to 956fa35 Compare 956fa35 to bab7c2a Compare bab7c2a to aa21fe9 Compare 6efd4ac to ee73c58 Compare ee73c58 to d270d56 Compare Adding config option to set protocols in the config that are whitelisted to be opened directly. The behaviour is documented in docs\howto\customize-link-protocols.md.
| @timabbott could you may be take another look on the PR? Everything should be there now, would be cool if we can merge it in main, |
shubham-padia left a comment
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.
This is great work! Tested and it works fine. Requested some changes for comments.
| import {Html, html} from "./html.ts"; | ||
| import * as t from "./translation-util.ts"; | ||
| | ||
| /* Fetches the current protocolLaunchers from settings.json */ |
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.
protocolLaunchers doesn't seem like a noun. I don't think this comment is needed, since it is clear from using ConfigUtil.getConfigItem( that we are fetching from settings.json
| By default, the following protocols are whitelisted: | ||
| | ||
| ``` | ||
| http https mailto tel sip |
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.
Maybe we can separate this using a comma?
| | ||
| It is possible to customize the list of whitelisted protocols by editing the `settings.json` file located at: `userdata/Zulip/config/settings.json` | ||
| | ||
| To add or modify the list, the `whitelistedProtocols` key can be updated. For example: |
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.
To add or modify -> To modify
| | ||
| Links using these protocols are opened directly by the system. | ||
| | ||
| All other protocols are considered potentially unsafe and are therefore opened indirectly—through a local HTML file—in your default web browser. |
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.
file-in -> file in
| Opened #1467 with the proposed changes while keeping the author same. |
What's this PR do?
It exposes the whitelisted protocols list so users can add additional protocols that should not use the link wrapper.
Adresses Issue: #1284
You have tested this PR on: