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 master · Tencent/APIJSON · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
Tencent
/
APIJSON
Public
Notifications
You must be signed in to change notification settings
Fork
2.3k
Star
18.4k
Code
Issues
238
Pull requests
3
Actions
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Wiki
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.13 KB
Breadcrumbs
APIJSON
/
APIJSONORM
/
src
/
main
/
java
/
apijson
/
MethodAccess.java
Copy path
File metadata and controls
executable file
·
66 lines (52 loc) · 2.13 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 Tencent. 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
.
orm
.
AbstractVerifier
.
ADMIN
;
import
static
apijson
.
orm
.
AbstractVerifier
.
CIRCLE
;
import
static
apijson
.
orm
.
AbstractVerifier
.
CONTACT
;
import
static
apijson
.
orm
.
AbstractVerifier
.
LOGIN
;
import
static
apijson
.
orm
.
AbstractVerifier
.
OWNER
;
import
static
apijson
.
orm
.
AbstractVerifier
.
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};
*/
String
[]
GET
()
default
{
UNKNOWN
,
LOGIN
,
CONTACT
,
CIRCLE
,
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#HEAD}
* @return 该请求方法允许的角色 default {UNKNOWN, LOGIN, CONTACT, CIRCLE, OWNER, ADMIN};
*/
String
[]
HEAD
()
default
{
UNKNOWN
,
LOGIN
,
CONTACT
,
CIRCLE
,
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#GETS}
* @return 该请求方法允许的角色 default {LOGIN, CONTACT, CIRCLE, OWNER, ADMIN};
*/
String
[]
GETS
()
default
{
LOGIN
,
CONTACT
,
CIRCLE
,
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#HEADS}
* @return 该请求方法允许的角色 default {LOGIN, CONTACT, CIRCLE, OWNER, ADMIN};
*/
String
[]
HEADS
()
default
{
LOGIN
,
CONTACT
,
CIRCLE
,
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#POST}
* @return 该请求方法允许的角色 default {LOGIN, ADMIN};
*/
String
[]
POST
()
default
{
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#PUT}
* @return 该请求方法允许的角色 default {OWNER, ADMIN};
*/
String
[]
PUT
()
default
{
OWNER
,
ADMIN
};
/**@see {@link RequestMethod#DELETE}
* @return 该请求方法允许的角色 default {OWNER, ADMIN};
*/
String
[]
DELETE
()
default
{
OWNER
,
ADMIN
};
}
Back
|
FazBrowse Home
|
New Git URL