Merge branch 'main' into dev

pull/607/head
alimy 8 months ago
commit 91f3db2210

@ -532,6 +532,9 @@ func (s *looseSrv) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, m
// 检测访问权限 // 检测访问权限
// TODO: 提到最前面去检测 // TODO: 提到最前面去检测
switch { switch {
case req.User.ID == postFormated.User.ID:
//fix 如果是自己 直接查看
break
case req.User != nil && req.User.IsAdmin: case req.User != nil && req.User.IsAdmin:
break break
case post.Visibility == core.PostVisitPublic: case post.Visibility == core.PostVisitPublic:

Loading…
Cancel
Save