Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@motorina0
Copy link
Collaborator

@motorina0 motorina0 commented May 21, 2024

Summary

It was previously possible for a user to access an installed extension even if the user did not explicitly enabled that extension.
With this PR the enable/disable state for an extension is enforced for both the UI and the API.

Prerequisite for #2516

Test Scenario

@motorina0 motorina0 changed the title [Feat] check user ext access [fix] check user ext access May 21, 2024
@codecov
Copy link

codecov bot commented May 21, 2024

Codecov Report

Attention: Patch coverage is 56.41026% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 61.80%. Comparing base (35bb3cc) to head (d757ef7).

Files Patch % Lines
lnbits/decorators.py 63.63% 4 Missing ⚠️
lnbits/app.py 0.00% 3 Missing ⚠️
lnbits/core/views/extension_api.py 0.00% 3 Missing ⚠️
lnbits/core/views/generic.py 0.00% 3 Missing ⚠️
lnbits/extension_manager.py 25.00% 3 Missing ⚠️
lnbits/settings.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2519      +/-   ##
==========================================
+ Coverage   61.76%   61.80%   +0.04%     
==========================================
  Files          69       69              
  Lines        9689     9703      +14     
==========================================
+ Hits         5984     5997      +13     
- Misses       3705     3706       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@motorina0 motorina0 requested review from arcbtc, dni and prusnak May 21, 2024 08:08
@motorina0 motorina0 marked this pull request as ready for review May 21, 2024 08:09
@motorina0 motorina0 changed the title [fix] check user ext access [fix] check user extension access May 21, 2024
@arcbtc
Copy link
Member

arcbtc commented May 21, 2024

image
Perfect!

@motorina0 motorina0 merged commit 0d447f6 into dev May 21, 2024
@motorina0 motorina0 deleted the feat_check_user_ext_access branch May 21, 2024 10:17
dni pushed a commit that referenced this pull request May 22, 2024
* feat: check user extension access
* fix: handle upgraded extensions
dni pushed a commit that referenced this pull request May 22, 2024
* feat: check user extension access
* fix: handle upgraded extensions
motorina0 added a commit that referenced this pull request Jul 10, 2024
* feat: check user extension access
* fix: handle upgraded extensions
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.

4 participants