VirtusLab-Open-Source / strapi-plugin-comments

A plugin for Strapi Headless CMS that provides end to end comments feature with their moderation panel, bad words filtering, abuse reporting and more.
MIT License
413 stars 65 forks source link

fix: dememoize permissions to follow strapi plugins template #248

Closed cyp3rius closed 9 months ago

cyp3rius commented 9 months ago

Ticket

https://github.com/VirtusLab/strapi-plugin-comments/issues/247

Summary

What does this PR do/solve?

Solved issue with not iterable permissions set after memoization in Strapi v4.19+

Test Plan

  1. Runs Strapi
  2. See that you're able to run Settings page without an error
codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (df68c74) 80.56% compared to head (4dde8c9) 80.56%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #248 +/- ## ======================================= Coverage 80.56% 80.56% ======================================= Files 35 35 Lines 926 926 Branches 314 314 ======================================= Hits 746 746 Misses 176 176 Partials 4 4 ``` | [Flag](https://app.codecov.io/gh/VirtusLab-Open-Source/strapi-plugin-comments/pull/248/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VirtusLab-Open-Source) | Coverage Δ | | |---|---|---| | [unittest](https://app.codecov.io/gh/VirtusLab-Open-Source/strapi-plugin-comments/pull/248/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VirtusLab-Open-Source) | `80.56% <100.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VirtusLab-Open-Source#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.