forked from zhangchunlin/uliweb-apijson
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsettings.ini
More file actions
25 lines (23 loc) · 978 Bytes
/
settings.ini
File metadata and controls
25 lines (23 loc) · 978 Bytes
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
#apijson style role names
[ROLES]
ADMIN = _('APIJSON ADMIN'), 'uliweb.contrib.rbac.superuser', True
UNKNOWN = _('APIJSON UNKNOWN'), 'uliweb.contrib.rbac.anonymous', True
LOGIN = _('APIJSON LOGIN'), 'uliweb.contrib.rbac.trusted', True
#will do more when query in the database
OWNER = _('APIJSON OWNER'), 'uliweb.contrib.rbac.trusted', True
[APIJSON_MODELS]
user = {
"user_id_field" : "id",
"secret_fields" : ["password"],
"GET" : { "roles" : ["ADMIN","OWNER"] },
"HEAD" : { "roles" : ["ADMIN","OWNER"] },
"POST" : { "roles" : ["ADMIN"] },
"PUT" : { "roles" : ["ADMIN","OWNER"] },
"DELETE" : { "roles" : ["ADMIN"] },
}
[FUNCTIONS]
get_apijson_tables = "uliweb_apijson.apijson.get_apijson_tables"
get_apijson_table = "uliweb_apijson.apijson.get_apijson_table"
has_obj_role = "uliweb_apijson.apijson.has_obj_role"
has_obj_permission = "uliweb_apijson.apijson.has_obj_permission"
has_permission_as_role = "uliweb_apijson.apijson.has_permission_as_role"