Skip to content

Commit

Permalink
fix/修改普通用户无法查看自己发表的文章问题
Browse files Browse the repository at this point in the history
修改普通用户无法查看自己发表的文章问题
  • Loading branch information
Q-xuan authored Jan 10, 2025
1 parent 0cf5ae5 commit 6d8088d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/servants/web/loose.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,9 @@ func (s *looseSrv) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, m
// 检测访问权限
// TODO: 提到最前面去检测
switch {
case req.User.ID == postFormated.User.ID:
//fix 如果是自己 直接查看
break
case req.User != nil && req.User.IsAdmin:
break
case post.Visibility == core.PostVisitPublic:
Expand Down

0 comments on commit 6d8088d

Please sign in to comment.