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

Permissions Grants for MessagesGet #748

Merged
merged 6 commits into from
Jun 26, 2024

Conversation

LiranCohen
Copy link
Member

@LiranCohen LiranCohen commented May 30, 2024

This PR modifies MessagesGet to better suit it's use and support permissions.

  • MessagesGet now only supports getting a single message
    • If a message has data, it will be provided via a data method similarly to ReocrdsRead
  • Can Grant Permissions for MessagesGet scoped
    • Allows unrestricted scope (no protocol scope spcified)
    • If scoped to a protocol and the message to get is a Permissions-Protocol record, it will match against the scope.
    • Delete messages are matched against the protocol of the RecordsWrite they reference

@LiranCohen LiranCohen force-pushed the lirancohen/messages-get-authorization branch 2 times, most recently from 79bca89 to ab3ebf2 Compare May 31, 2024 19:00
@codecov-commenter
Copy link

codecov-commenter commented May 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.69%. Comparing base (d96caec) to head (b82212b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #748      +/-   ##
==========================================
+ Coverage   98.66%   98.69%   +0.02%     
==========================================
  Files          73       74       +1     
  Lines       11091    11268     +177     
  Branches     1584     1609      +25     
==========================================
+ Hits        10943    11121     +178     
+ Misses        142      141       -1     
  Partials        6        6              

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

@LiranCohen LiranCohen force-pushed the lirancohen/messages-get-authorization branch 2 times, most recently from 812aeb4 to 25f9bd7 Compare June 4, 2024 15:37
@LiranCohen LiranCohen force-pushed the lirancohen/messages-get-authorization branch 5 times, most recently from 9ea4b3c to 00eb5d2 Compare June 24, 2024 16:12
@LiranCohen LiranCohen changed the base branch from main to lirancohen/events-query-permission-grants June 24, 2024 16:20
@LiranCohen LiranCohen force-pushed the lirancohen/messages-get-authorization branch from 00eb5d2 to e15ee22 Compare June 24, 2024 16:20
Base automatically changed from lirancohen/events-query-permission-grants to main June 25, 2024 00:30
@LiranCohen LiranCohen force-pushed the lirancohen/messages-get-authorization branch from e15ee22 to afa5590 Compare June 25, 2024 00:41
@LiranCohen LiranCohen force-pushed the lirancohen/messages-get-authorization branch 2 times, most recently from a7e1e93 to a7ea85d Compare June 25, 2024 18:54
@LiranCohen LiranCohen marked this pull request as ready for review June 25, 2024 19:08
Copy link
Contributor

@thehenrytsai thehenrytsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love how it is sorta in parity with RecordsRead! Except for the name 😉.

A few small comments.

@LiranCohen LiranCohen force-pushed the lirancohen/messages-get-authorization branch from 0b41033 to b82212b Compare June 26, 2024 01:12
@LiranCohen LiranCohen requested a review from thehenrytsai June 26, 2024 01:15
@LiranCohen LiranCohen changed the title [WIP] Permissions Grants for MessagesGet Permissions Grants for MessagesGet Jun 26, 2024
Copy link
Contributor

@thehenrytsai thehenrytsai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐐 🚀

@LiranCohen LiranCohen merged commit 592597a into main Jun 26, 2024
4 checks passed
@LiranCohen LiranCohen deleted the lirancohen/messages-get-authorization branch June 26, 2024 02:05
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.

3 participants