Skip to content

Commit

Permalink
Merge pull request #601 from Q-xuan/main
Browse files Browse the repository at this point in the history
fix/修改普通用户无法查看自己发表的文章问题
  • Loading branch information
alimy authored Jan 19, 2025
2 parents 0cf5ae5 + 6d8088d commit e1cf68f
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 e1cf68f

Please sign in to comment.