Commit 4c52c6c7 by 阳浪

我的配置信息角色校验

parent 2ab56c41
......@@ -45,11 +45,11 @@ public class PolicyController {
@RequestMapping(value = "/policy", method = RequestMethod.GET)
public Response<String> token(@RequestParam(name = "needTranscode", required = false) Boolean needTranscode, @RequestParam(name = "type", required = false, defaultValue = "0") Integer type) {
RequestContext context = ContextHolder.get();
/*RequestContext context = ContextHolder.get();
if(context==null||context.getAccountId()==null||context.getAccountId()==0L){
return Response.fail("未登录!禁止访问");
}
LOGGER.info("登录人:{},{}",context.getAccountId(),context.getAccountName());
LOGGER.info("登录人:{},{}",context.getAccountId(),context.getAccountName());*/
String endpoint = propertiesUtil.getPublicParam().get("endpoint");
String accessId = propertiesUtil.getPublicParam().get("accessKeyId");
String accessKey = propertiesUtil.getPublicParam().get("accessKeySecret");
......@@ -125,11 +125,11 @@ public class PolicyController {
public Response<String> download(
@ApiParam(name = "key", value = "文件在oss存储路径", required = true) @RequestParam(value = "key", required = true) String key
) {
RequestContext context = ContextHolder.get();
/*RequestContext context = ContextHolder.get();
if(context==null||context.getAccountId()==null||context.getAccountId()==0L){
return Response.fail("未登录!禁止访问");
}
LOGGER.info("登录人:{},{}",context.getAccountId(),context.getAccountName());
LOGGER.info("登录人:{},{}",context.getAccountId(),context.getAccountName());*/
String endpoint = propertiesUtil.getPublicParam().get("endpoint");
String accessId = propertiesUtil.getPublicParam().get("accessKeyId");
String accessKey = propertiesUtil.getPublicParam().get("accessKeySecret");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment