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

Add a policy option to disable Brave Wallet #25383

Closed
mkarolin opened this issue Sep 13, 2022 · 1 comment · Fixed by brave/brave-core#15252
Closed

Add a policy option to disable Brave Wallet #25383

mkarolin opened this issue Sep 13, 2022 · 1 comment · Fixed by brave/brave-core#15252
Assignees
Labels

Comments

@mkarolin
Copy link
Contributor

mkarolin commented Sep 13, 2022

This is a sub-task for #22029

Test Plan:

  1. Set the policy to disable Brave Wallet:
  • [Linux]
    (sudo is needed in this step) Go to /etc/brave/policies/managed (create folders if not exists already), create test_policy.json with content:
{
  "BraveWalletDisabled": true
}
  • [Windows]
    Open regedit and create the following keys: BraveSoftware\Brave under the existing key

    • For 64 bit, HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Policies
    • For 32 bit, HKEY_LOCAL_MACHINE\SOFTWARE\Policies

    Create a DWORD value at this path called BraveWalletDisabled and set the value as 1

  • [MacOS]

    • Create folder /Library/Managed Preferences/<username>/, if one doesn't exist (you will need to use sudo)
    • In the above folder create (or open; you will need to use sudo) the file named com.brave.Browser.<CHANNEL>.plist (where <CHANNEL> will be nightly, beta, or nothing for the release channel: e.g com.brave.Browser.nightly.plist) with the content:
      <?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>BraveWalletDisabled</key>
         <true/>
       </dict>
      </plist>
      

    Note: MacOS caches these preferences, so if you delete or rename this file and restart the browser it will still retain this policy. In order to reset the policy quit the browser fully, delete or rename the file and issue to following command:

    defaults read /Library/Managed\ Preferences/<username>/com.brave.Browser.<CHANNEL>.plist
    

    You should see output similar to:

    2022-09-28 18:46:43.413 defaults[10710:143731] 
    Domain /Library/Managed Preferences/<username>/com.brave.Browser.nightly.plist does not exist
    

    Start the browser and you should be able to see the Rewards feature again.

  1. Open Brave and navigate to brave://policy. Observe:

image

  1. Navigate to brave://policy. Observe This site can’t be reached error page.
  2. Open application menu (☰). Observe Wallet menu item is not present.
  3. Navigate to brave://settings. Observe:
    • Wallet item is not present in the top Settings toolbar
    • Wallet item is not present in the left navigation menu
  4. Observe in the sidebar the Wallet button is not present.
@mkarolin mkarolin added priority/P3 The next thing for us to work on. It'll ride the trains. QA/Yes release-notes/exclude feature/web3/wallet Integrating Ethereum+ wallet support enterprise OS/Desktop labels Sep 13, 2022
@mkarolin mkarolin self-assigned this Sep 13, 2022
@Miyayes Miyayes changed the title Add a policy option to disable Wallet Add a policy option to disable Brave Wallet Sep 16, 2022
@mkarolin mkarolin added this to the 1.46.x - Nightly milestone Sep 30, 2022
@srirambv
Copy link
Contributor

srirambv commented Nov 1, 2022

Verification passed on

Brave 1.46.81 Chromium: 107.0.5304.68 (Official Build) beta (64-bit)
Revision a4e93e89d3b3df1be22214603fba846ad0183ca5-refs/branch-heads/5304@{#991}
OS Linux
  • Verified steps from issue description
  • Verified with policy enabled, brave://wallet doesn't load and shows error page
  • Verified Wallet is removed from Settings and Side panel when policy is enabled
  • Verified Wallet is not show in settings toolbar
    image

Verification passed on

Brave 1.46.81 Chromium: 107.0.5304.68 (Official Build) beta (64-bit)
Revision a4e93e89d3b3df1be22214603fba846ad0183ca5-refs/branch-heads/5304@{#991}
OS Windows 11 Version 22H2 (Build 22621.674)
  • Verified steps from issue description
  • Verified with policy enabled, brave://wallet doesn't load and shows error page
  • Verified Wallet is removed from Settings and Side panel when policy is enabled
  • Verified Wallet is not show in settings toolbar
    image

Verification passed on

Brave 1.46.81 Chromium: 107.0.5304.68 (Official Build) beta (arm64)
Revision a4e93e89d3b3df1be22214603fba846ad0183ca5-refs/branch-heads/5304@{#991}
OS macOS Version 13.0 (Build 22A380)
  • Verified steps from issue description
  • Verified with policy enabled, brave://wallet doesn't load and shows error page
  • Verified Wallet is removed from Settings and Side panel when policy is enabled
  • Verified Wallet is not show in settings toolbar
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants