Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-aliyun
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hqzhdj
cloud-aliyun
Commits
4c52c6c7
Commit
4c52c6c7
authored
Jan 10, 2025
by
阳浪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的配置信息角色校验
parent
2ab56c41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cloud-aliyun-service/src/main/java/com/yizhi/aliyun/application/controller/PolicyController.java
+4
-4
No files found.
cloud-aliyun-service/src/main/java/com/yizhi/aliyun/application/controller/PolicyController.java
View file @
4c52c6c7
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment