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

Hide "add rule" button if allowAddRules is false #51

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

piroor
Copy link
Member

@piroor piroor commented Jul 25, 2024

Which issue(s) this PR fixes:

N/A

What this PR does / why we need it:

There is an internal option "allowAddRules" to disallow users to add new rules, but it is not applied correctly and the "add new rule" button is still available even if "allowAddRules" is "false".
This PR hides the button with "allowAddRules"="false".

How to verify the fixed issue:

The steps to verify:

  1. Start Thunderbird.
  2. Go to addons manager.
  3. Install this addon.
  4. Click the "options" button of this addon.
  5. Scroll to the bottom of the options page.
  6. Activate "Debug mode".
  7. Set "allowAddRules" to "false".
  8. Close the options page.
  9. Go to the addons manager and click the "options" button of this addon again.

Expected result:

There is no button below the extra rules section.

@piroor piroor mentioned this pull request Jul 25, 2024
@piroor piroor requested a review from HashidaTKS July 25, 2024 07:40
@HashidaTKS
Copy link
Contributor

I have confirmed that this works fine.

LGTM.

@HashidaTKS HashidaTKS merged commit 8583fe8 into master Jul 25, 2024
1 check passed
@kenhys kenhys deleted the apply-allowAddRules branch August 5, 2024 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants