Ptt-official-app / go-pttbbsweb

golang 版本的 pttbbs app/web backend
https://doc.devptt.dev
GNU General Public License v3.0
33 stars 17 forks source link

add read-write-permission for user-board and user-article. #556

Closed chhsiao1981 closed 1 month ago

chhsiao1981 commented 1 month ago

這個 PR 的目的 / Purpose of this PR

add read-write-permission for user-board and user-article.

  1. simplify schema to UserBoard and UserArticle
  2. api.UserBoardPerm
  3. api.UserArticlePerm
  4. board.ParentID

相關的 issue / Related Issues

codecov-commenter commented 1 month ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 40.56738% with 419 lines in your changes missing coverage. Please review.

Project coverage is 55.64%. Comparing base (931c3a8) to head (14cd9a1). Report is 40 commits behind head on main.

Files with missing lines Patch % Lines
api/user_board_perm.go 21.31% 127 Missing and 28 partials :warning:
api/user_article_perm.go 34.18% 56 Missing and 21 partials :warning:
schema/article_perm_info.go 0.00% 22 Missing :warning:
api/get_user_info.go 33.33% 15 Missing and 3 partials :warning:
schema/user_board.go 35.71% 14 Missing and 4 partials :warning:
schema/user_article.go 11.11% 14 Missing and 2 partials :warning:
api/errors.go 0.00% 15 Missing :warning:
schema/user_posttime.go 0.00% 12 Missing :warning:
schema/board_perm_info.go 0.00% 9 Missing :warning:
schema/user_perm_info.go 0.00% 9 Missing :warning:
... and 24 more

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #556 +/- ## ========================================== - Coverage 56.58% 55.64% -0.94% ========================================== Files 199 207 +8 Lines 15090 12382 -2708 ========================================== - Hits 8538 6890 -1648 + Misses 5569 4443 -1126 - Partials 983 1049 +66 ```

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