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

feat: add COMMENT_CONTENT permission #998

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

RiccardoM
Copy link
Contributor

@RiccardoM RiccardoM commented Aug 31, 2022

Description

This PR adds the support for the COMMENT_CONTENT permission within the x/posts module.
This permission allows only commenting existing content, without being able to create new root posts. This is particularly useful to all applications that use subspace sections to represent personal blogs: in this case you want to have only one user with the WRITE_CONTENT permission, while external users should only have the COMMENT_CONTENT permission instead.

This feature request was raised by @g-luca for Scripta.

Closes: #997


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@RiccardoM RiccardoM marked this pull request as ready for review August 31, 2022 14:48
@codecov
Copy link

codecov bot commented Aug 31, 2022

Codecov Report

Base: 80.50% // Head: 80.50% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (0006dda) compared to base (974fc37).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #998   +/-   ##
=======================================
  Coverage   80.50%   80.50%           
=======================================
  Files         175      175           
  Lines       15289    15291    +2     
=======================================
+ Hits        12308    12310    +2     
  Misses       2450     2450           
  Partials      531      531           
Impacted Files Coverage Δ
x/posts/keeper/msg_server.go 89.91% <100.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link

@manu0466 manu0466 left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@RiccardoM RiccardoM added the automerge Automatically merge PR once all prerequisites pass label Sep 1, 2022
@mergify mergify bot merged commit 86c977c into master Sep 1, 2022
@mergify mergify bot deleted the riccardom/add-comment-permission branch September 1, 2022 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PR once all prerequisites pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a comment-specific permission
3 participants