Ver código fonte

update VideoPlayServiceImpl

reghao 10 meses atrás
pai
commit
54012a7e39

+ 4 - 0
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/service/impl/VideoPlayServiceImpl.java

@@ -76,6 +76,10 @@ public class VideoPlayServiceImpl implements VideoPlayService {
         String urlType = list.get(0).getType();
         int scope = videoPost.getScope();
         Set<Integer> userScopes = new HashSet<>(contentPermission.getUserScopes());
+        if (loginUser == videoPost.getPublishBy()) {
+            userScopes.add(PostScope.PRIVATE.getCode());
+        }
+
         // 判断当前请求是否具备访问 video 需要的权限
         if (!userScopes.contains(scope)) {
             return new VideoUrls();