forked from zhangchunlin/uliweb-apijson
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsettings.ini
More file actions
67 lines (64 loc) · 1.69 KB
/
Copy pathsettings.ini
File metadata and controls
67 lines (64 loc) · 1.69 KB
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
67
[MODELS]
privacy = 'apijson_demo.models.Privacy'
comment = 'apijson_demo.models.Comment'
moment = 'apijson_demo.models.Moment'
[APIJSON_MODELS]
user = {
"user_id_field" : "id",
"secret_fields" : ["password"],
"GET" : { "roles" : ["LOGIN","ADMIN","OWNER"] },
"HEAD" : { "roles" : ["LOGIN","ADMIN","OWNER"] },
"POST" : { "roles" : ["ADMIN"] },
"PUT" : { "roles" : ["ADMIN","OWNER"] },
"DELETE" : { "roles" : ["ADMIN"] },
}
moment = {
"user_id_field" : "user_id",
"GET" : { "roles" : ["OWNER","LOGIN","ADMIN"] },
"HEAD" : { "roles" : ["OWNER","LOGIN","ADMIN"] },
"POST" : { "roles" : ["OWNER","ADMIN"] },
"PUT" : { "roles" : ["OWNER","ADMIN"] },
"DELETE" : { "roles" : ["OWNER","ADMIN"] },
}
comment = {
"user_id_field" : "user_id",
"GET" : { "roles" : ["OWNER","LOGIN","ADMIN"] },
"HEAD" : { "roles" : ["OWNER","LOGIN","ADMIN"] },
"POST" : { "roles" : ["OWNER","ADMIN"] },
"PUT" : { "roles" : ["OWNER","ADMIN"] },
"DELETE" : { "roles" : ["OWNER","ADMIN"] },
}
[APIJSON_REQUESTS]
user = {
"POST" :{
"ADD":{"@role": "ADMIN"},
"DISALLOW" : ["id"],
"NECESSARY" : ["username","nickname"],
},
"PUT" :{
"ADD":{"@role": "OWNER"},
"NECESSARY" : ["id"],
},
}
moment = {
"POST" :{
"ADD":{"@role": "OWNER"},
"DISALLOW" : ["id"],
"NECESSARY" : ["content"],
},
"PUT" :{
"ADD":{"@role": "OWNER"},
"NECESSARY" : ["id","content"],
},
}
comment = {
"POST" :{
"ADD" :{"@role": "OWNER"},
"DISALLOW" : ["id"],
"NECESSARY" : ["content"]
},
"PUT" :{
"ADD":{"@role": "OWNER"},
"NECESSARY" : ["id","content"],
},
}