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

[MM-61821] Automatically allow permission checks for supported permission types through for GPO configured servers #3231

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

devinbinnie
Copy link
Member

Summary

This is a small QoL improvement for enterprise users who have their Desktop App configured for them by their system administrator. Normally the application will ask for permission to send notifications, access the camera/microphone, and other system related permissions on a per-server basis. However, if the server is configured using Group Policy on Windows, we can make an assumption that the server is trusted since it is configured at the registry level.

This PR just removes the permission check for those servers.

Ticket Link

https://mattermost.atlassian.net/browse/MM-61821

Skip per-server permission checks for GPO-configured servers on Windows

…sion types through for GPO configured servers
@devinbinnie devinbinnie added 2: Dev Review Requires review by a core committer 3: Security Review Review requested from Security Team labels Nov 27, 2024
@devinbinnie devinbinnie added this to the v5.11.0 milestone Nov 27, 2024
@devinbinnie devinbinnie requested review from a team and davidkrauser and removed request for a team November 27, 2024 14:44
@devinbinnie devinbinnie requested review from enzowritescode, Rajat-Dabade and larkox and removed request for Rajat-Dabade November 27, 2024 14:44
Copy link
Contributor

@larkox larkox left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -152,6 +153,12 @@ export class PermissionsManager extends JsonFileManager<PermissionsByOrigin> {
return false;
}

// For GPO servers, we always allow permissions since they are trusted
const serverHref = serverURL.href;
if (Config.registryData?.servers?.some((s) => parseURL(s.url)?.href === serverHref)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just sanity check question. At Config.registryData?.servers? we only have GPO servers, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, they are servers that come from the Windows registry. I was considering doing all predefined servers (including ones specified by the build), but I thought that might expose people to be tricked into downloading an app with a pre-configured server that has access to everything.

Copy link

@davidkrauser davidkrauser 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 👍

@devinbinnie devinbinnie removed the 2: Dev Review Requires review by a core committer label Nov 27, 2024
@devinbinnie
Copy link
Member Author

@enzowritescode Gentle ping for review :)

@devinbinnie devinbinnie added 4: Reviews Complete All reviewers have approved the pull request and removed 3: Security Review Review requested from Security Team labels Dec 3, 2024
@devinbinnie devinbinnie merged commit 1894d8a into master Dec 3, 2024
19 checks passed
@devinbinnie devinbinnie deleted the MM-61821 branch December 3, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4: Reviews Complete All reviewers have approved the pull request release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants