28 KiB
28 KiB
PermissionApi
[toc]
getPrivileges(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
identity_id | string | false | 主体id |
identity_type | string | false | 主体类型 |
identity_name | string | false | 主体名称 |
application_id | string | true | 应用id |
object_type | string | false | 对象类型(可选值: data, api, ui, res_set, app) |
object_code | string | false | 对象代码 |
affect | string | false | 作用方式(affect,deny) |
page_num | string | false | 起始页,默认1 |
page_size | string | false | 页大小,默认20 |
page_sort | string | false | 排序方式,格式:字段[排序方式] |
getAuthUnits(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
identity_id | string | false | 主体id |
identity_type | string | false | 主体类型 |
identity_name | string | false | 主体名称 |
page_num | string | false | 起始页,默认1 |
page_size | string | false | 页大小,默认20 |
page_sort | string | false | 排序方式,格式:字段[排序方式] |
getAuthUnit(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
id | string | true | au id |
createAuthUnitRules(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
identities | array | false | |
rules | array | false |
modifyAuthUnit(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
rid | string | true | AU id |
tid | string | true | 规则id |
getAuthUnitsRules(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
rid | string | true | AU id |
application_id | string | false | 应用id |
type | string | false | 规则类型 |
code | string | false | 资源或资源集合code |
self_only | string | false | 只查询指定主体下的授权 |
resource_id | string | false | 资源id,当type=api,ui,data时有效 |
resource_match_all_resources | string | false | 匹配所有资源,当type=res时有效 |
resource_match_all_actions | string | false | 匹配所有资源操作,当type=res时有效 |
resource_set_id | string | false | 资源集合id,当type=res_set |
queryAuthUnitsRules(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
application_id | string | false | 应用id |
type | string | false | 规则类型 |
code | string | false | 资源或资源集合code |
identity_id | string | true | 主体id |
identity_type | string | true | 主体类型 |
identity_name | string | false | 主体名称 |
self_only | string | false | 只查询指定主体下的授权 |
resource_id | string | false | 资源id,当type=api,ui,data时有效 |
resource_match_all_resources | string | false | 匹配所有资源,当type=res时有效 |
resource_match_all_actions | string | false | 匹配所有资源操作,当type=res时有效 |
resource_set_id | string | false | 资源集合id,当type=res_set |
deleteAuthUnitRules(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
ids | array | true |
createResource(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
description | string | false | 描述 |
code | string | false | 资源代码 |
application_id | number | false | 应用id |
type | string | false | 资源类型,data/api/ui |
uri | string | false | 资源URI, 当type=api/ui 时有效 |
actions | array | false |
modifyResource(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
id | string | true | 资源id |
description | string | false | 描述 |
uri | string | false | 资源URI, 当type=api/ui 时有效 |
actions | array | false |
getResources(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
application_id | string | true | 应用id |
type | string | false | 资源类型 |
code | string | false | 资源代码 |
include_global | string | false | 是否查询包含全局资源 |
page_num | string | false | 起始页,默认1 |
page_size | string | false | 页大小,默认20 |
page_sort | string | false | 排序方式,格式:字段[排序方式] |
getResource(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
id | string | true | 资源id |
application_id | string | true | 应用id |
deleteResources(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
ids | array | true |
createResourceSet(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
code | string | false | 集合代码 |
description | string | false | 描述 |
application_id | string | false | 应用id |
modifyResourceSet(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
id | string | true | 集合id |
code | string | false | 集合代码 |
description | string | false | 描述 |
getResourceSets(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
code | string | false | 集合代码 |
application_id | string | true | 应用id |
include_global | string | false | 查询是否包含全局资源集合 |
page_num | string | false | 起始页,默认1 |
page_size | string | false | 页大小,默认20 |
page_sort | string | false | 排序方式,格式:字段[排序方式] |
getResourceSet(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
id | string | true | 资源集合id |
createResourceSetMember(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
id | string | true | 集合id |
resource_id | number | false | |
resource_scope | string | false | |
resource_actions | array | false | |
match_all_actions | boolean | false |
modifyResourceSetMember(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
sid | string | true | 资源集合id |
mid | string | true | 资源集合成员id |
resource_id | number | false | |
resource_scope | string | false | |
ResourceActions | array | false | |
match_all_actions | boolean | false |
getResourceMembers(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
sid | string | true | 资源集合id |
resource_code | string | false | 资源代码 |
resource_type | string | false | 资源类型 |
page_num | string | false | 起始页,默认1 |
page_size | string | false | 页大小,默认20 |
page_sort | string | false | 排序方式,格式:字段[排序方式] |
getResourceMember(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
sid | string | true | 资源集合id |
mid | string | true | 成员id |
authorizeApplications(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
identities | array | false | |
application_id | string | false | |
affect | string | false | allow, deny |
listAuthorizedApplications(param)
param properties
名称 | 类型 | 是否必须 | 描述 |
---|---|---|---|
identity_id | string | true | 授权主体 id |
identity_type | string | true | 授权主体类型 |
type | string | false | 应用类型: 0-默认应用 1-自建应用 2-模板应用 3-组件应用 |