FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
APIJSON/APIJSONORM/src/main/java/apijson/MethodAccess.java at tmpapijson · 403f/APIJSON · GitHub
403f
/
APIJSON
Public
forked from
Tencent/APIJSON
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
APIJSON
/
APIJSONORM
/
src
/
main
/
java
/
apijson
/
MethodAccess.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
66 lines (52 loc) · 2.14 KB
Breadcrumbs
APIJSON
/
APIJSONORM
/
src
/
main
/
java
/
apijson
/
MethodAccess.java
Copy path
File metadata and controls
executable file
·
66 lines (52 loc) · 2.14 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
This source code is licensed under the Apache License Version 2.0.*/
package
apijson
;
import
java
.
lang
.
annotation
.
Documented
;
import
java
.
lang
.
annotation
.
Inherited
;
import
java
.
lang
.
annotation
.
Retention
;
import
java
.
lang
.
annotation
.
Target
;
import
static
apijson
.
RequestRole
.
ADMIN
;
import
static
apijson
.
RequestRole
.
CIRCLE
;
import
static
apijson
.
RequestRole
.
CONTACT
;
import
static
apijson
.
RequestRole
.
LOGIN
;
import
static
apijson
.
RequestRole
.
OWNER
;
import
static
apijson
.
RequestRole
.
UNKNOWN
;
import
static
java
.
lang
.
annotation
.
ElementType
.
TYPE
;
import
static
java
.
lang
.
annotation
.
RetentionPolicy
.
RUNTIME
;
/**请求方法权限,只允许某些角色通过对应方法访问
* @author Lemon
*/
@
Documented
@
Retention
(
RUNTIME
)
@
Target
(
TYPE
)
@
Inherited
public
@interface
MethodAccess
{
/**@see {@link RequestMethod#GET}
* @return 该请求方法允许的角色 default {UNKNOWN, LOGIN, CONTACT, CIRCLE, OWNER, ADMIN};
*/
RequestRole
[]
GET
()
default
{
UNKNOWN
,
LOGIN
,
CONTACT
,
CIRCLE
,
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#HEAD}
* @return 该请求方法允许的角色 default {UNKNOWN, LOGIN, CONTACT, CIRCLE, OWNER, ADMIN};
*/
RequestRole
[]
HEAD
()
default
{
UNKNOWN
,
LOGIN
,
CONTACT
,
CIRCLE
,
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#GETS}
* @return 该请求方法允许的角色 default {LOGIN, CONTACT, CIRCLE, OWNER, ADMIN};
*/
RequestRole
[]
GETS
()
default
{
LOGIN
,
CONTACT
,
CIRCLE
,
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#HEADS}
* @return 该请求方法允许的角色 default {LOGIN, CONTACT, CIRCLE, OWNER, ADMIN};
*/
RequestRole
[]
HEADS
()
default
{
LOGIN
,
CONTACT
,
CIRCLE
,
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#POST}
* @return 该请求方法允许的角色 default {LOGIN, ADMIN};
*/
RequestRole
[]
POST
()
default
{
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#PUT}
* @return 该请求方法允许的角色 default {OWNER, ADMIN};
*/
RequestRole
[]
PUT
()
default
{
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#DELETE}
* @return 该请求方法允许的角色 default {OWNER, ADMIN};
*/
RequestRole
[]
DELETE
()
default
{
OWNER
,
ADMIN
};
}
Back
|
FazBrowse Home
|
New Git URL