Open stephendonner opened 3 years ago
From the brave://policy, policies set by using defaults write com.brave.Browser TorDisabled -bool true
is added as Recommended Policy
like below.
With another testing defaults write com.brave.Browser BrowserGuestModeEnabled -boolean true
,
Brave and Chrome show same behavior. Both browser displays BrowserGuestModeEnabled
as a recommended policy.
I think this is expected behavior because user set this policy. (not by admin).
Maybe macOS provides another way to make policies mandatory.
According to the chromium's doc,
Additional plist file is needed under /Library/Managed Preferences/<username>
. but I tested by adding com.brave.Browser.nightly.plist
with below below and it doesn't work. Still it's recommended policy.
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>TorDisabled</key>
<true/>
</dict>
</plist>
Chromium check whether policy is mandatory or not by using CFPreferencesAppValueIsForced()
.
See components/policy/core/common/policy_loader_mac.mm
@simonhong This actually worked for me.
Setting the following com.brave.Browser.plist file in /Library/Managed Preferences/$username
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>TorDisabled</key>
<true/>
</dict>
</plist>
It only applies to the current user rather than the machine
Moving from the $username for to /Library/Managed Preferences/
Made it mandatory for the whole machine.
The file that contains policies that are Recommended is
~/Library/Preferences/com.brave.Browser.plist
Hope this helps anyone.
@MrAshRhodes Wow, thanks for your great tip! 👍🏼
Whilst testing group-policy options for the Snowflake
extensions in https://github.com/brave/brave-browser/issues/25315, I noticed it also doesn't cover the newly-added Volunteer to help others connect to the network
pref:
Steps:
1.47.125
defaults write com.brave.Browser.beta TorDisabled -bool true
into a Terminal
/console window, and pressed return
New Private Window with Tor
menu option is removedActual Results:
However, both Private window with Tor
and Volunteer to help others connect to the Tor network
should be grayed out/disabled (NOT toggled Off
; unclickable)
Expected Results:
Both Private window with Tor
and Volunteer to help others connect to the Tor network
entries in brave://settings/privacy
should be disabled when TorDisabled
is true
brave://policy |
brave://settings/privacy |
---|---|
Tested in Win 11 x64
. Following have been found when TorDisabled
is true
:
brave://settings/privacy
in a new-tabVolunteer to help others connect to the Tor network toggle
Snowflake
brave://extensions
in a new-tabSnowflake
extension is shownHKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Policies\
TorDisabled
with value 1
brave://policy
TorDisabled
is truebrave://settings/privacy
Snowflake
extensionVolunteer to help other connect...
was toggled Off
and greyed outSnowflake
extension was NOT disabledPrivate Window with Tor
toggle is Off
and Private Window with Tor
option in the hamburger menu is not availableex1 | ex2 | ex3 |
---|---|---|
Description
"Private Window with Tor" and Snowflake's
Volunteer to help other connect...
Settings options should be disabled when Tor is admin-disabledFound while testing https://github.com/brave/brave-browser/issues/17530.
Steps to Reproduce
defaults write com.brave.Browser TorDisabled -integer 1
into aTerminal.app
window and pressenter
New Private Window with Tor
optionbrave://policy
and confirmTorDisabled
is set totrue
brave://settings/extensions
and look at thePrivate Window with Tor
optionActual result:
Private Window with Tor
is still toggle-able toon
andoff
, and works.Expected result:
Private Window with Tor
should be disabled, like Windows and Linux.Reproduces how often:
100%
Brave version (brave://version info)