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

Fix Manager::userHasPermission(), various fixes and improvements #203

Merged
merged 51 commits into from
Dec 5, 2023

Conversation

arogachev
Copy link
Contributor

@arogachev arogachev commented Oct 31, 2023

Q A
Is bugfix? ✔️/❌
New feature? ✔️/❌
Breaks BC? ✔️/❌

Additionally:

  • Improved Psalm types.
  • Raised code coverage to 100%.
  • Raised min MSI and fixed mutants.

@arogachev arogachev self-assigned this Oct 31, 2023
@arogachev arogachev linked an issue Oct 31, 2023 that may be closed by this pull request
@arogachev arogachev changed the base branch from master to no-direct-storage-use October 31, 2023 13:02
@what-the-diff
Copy link

what-the-diff bot commented Oct 31, 2023

PR Summary

  • Enhancement in Interface Management
    In the ManagerInterface, some new methods have been added such as getRole(), getPermission(), and hasChildren(). Additionally, there's a slight adjustment in parameter naming in the removePermission() method for clarity purposes.
  • Improvement in Assignment Storage Interface
    Added a new method called filterUserItemNames() to AssignmentsStorageInterface, which will enable more tailored user item name filtering.
  • Better Permission Management in Manager Class
    In the Manager class's userHasPermission() method, updates are made to tackle instances when either $userId is null or the guest role does not exist. This supports better handling of edge cases.
  • Expansion of Manager Class
    New methods: getItemsByUserId() and getRole() are now part of the Manager class, enhancing its functionalities.
  • Enhanced Testing Support
    Introduced support for rules in ManagerConfigurationTestTrait, improving our testing capabilities.
  • New Class Addition in Support Test Directory
    A new class called SubscriptionRule has been added under the tests/Support directory, broadening the scope of the test support provided.

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (8b1ef5d) 100.00% compared to head (67bd795) 100.00%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #203   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity        98       123   +25     
===========================================
  Files             10        11    +1     
  Lines            288       330   +42     
===========================================
+ Hits             288       330   +42     

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

@arogachev arogachev requested a review from a team November 23, 2023 14:16
@arogachev arogachev marked this pull request as ready for review November 23, 2023 14:16
@arogachev arogachev changed the title Fix Manager::userHasPermission() Fix Manager::userHasPermission(), various fixes and improvements Nov 23, 2023
@arogachev arogachev added type:bug Bug type:enhancement Enhancement type:task Task and removed type:task Task labels Nov 23, 2023
@arogachev arogachev added the status:code review The pull request needs review. label Nov 27, 2023
@arogachev arogachev requested a review from vjik December 2, 2023 12:53
@arogachev arogachev linked an issue Dec 5, 2023 that may be closed by this pull request
@arogachev arogachev merged commit a4f96ac into master Dec 5, 2023
@arogachev arogachev deleted the fix-user-has-permission branch December 5, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review. type:bug Bug type:enhancement Enhancement
Projects
None yet
3 participants