cr, err := client.Permission.SubjectPermission(context.Background(), &v1.PermissionSubjectPermissionRequest{
TenantId: "t1",
Metadata: &v1.PermissionSubjectPermissionRequestMetadata{
SnapToken: "",
SchemaVersion: "",
OnlyPermission: false,
Depth: 20,
},
Entity: &v1.Entity{
Type: "repository",
Id: "1",
},
Subject: &v1.Subject{
Type: "user",
Id: "1",
},
})client.permission.subjectPermission({
tenantId: "t1",
metadata: {
snapToken: "",
schemaVersion: "",
onlyPermission: true,
depth: 20
},
entity: {
type: "repository",
id: "1"
},
subject: {
type: "user",
id: "1"
}
}).then((response) => {
console.log(response);
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/subject-permission' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata":{
"snap_token": "",
"schema_version": "",
"only_permission": true,
"depth": 20
},
"entity": {
"type": "repository",
"id": "1"
},
"subject": {
"type": "user",
"id": "1",
"relation": ""
}
}'{
"results": {}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Subject Permission List
cr, err := client.Permission.SubjectPermission(context.Background(), &v1.PermissionSubjectPermissionRequest{
TenantId: "t1",
Metadata: &v1.PermissionSubjectPermissionRequestMetadata{
SnapToken: "",
SchemaVersion: "",
OnlyPermission: false,
Depth: 20,
},
Entity: &v1.Entity{
Type: "repository",
Id: "1",
},
Subject: &v1.Subject{
Type: "user",
Id: "1",
},
})client.permission.subjectPermission({
tenantId: "t1",
metadata: {
snapToken: "",
schemaVersion: "",
onlyPermission: true,
depth: 20
},
entity: {
type: "repository",
id: "1"
},
subject: {
type: "user",
id: "1"
}
}).then((response) => {
console.log(response);
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/permissions/subject-permission' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata":{
"snap_token": "",
"schema_version": "",
"only_permission": true,
"depth": 20
},
"entity": {
"type": "repository",
"id": "1"
},
"subject": {
"type": "user",
"id": "1",
"relation": ""
}
}'{
"results": {}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Path Parameters
Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant t1 for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.
Body
PermissionSubjectPermissionRequest is the request message for the SubjectPermission method in the Permission service.
PermissionSubjectPermissionRequestMetadata metadata for the PermissionSubjectPermissionRequest.
Show child attributes
Show child attributes
Entity represents an entity with a type and an identifier.
Show child attributes
Show child attributes
Subject represents an entity subject with a type, an identifier, and a relation.
Show child attributes
Show child attributes
Context encapsulates the information related to a single operation, including the tuples involved and the associated attributes.
Show child attributes
Show child attributes
Response
A successful response.
PermissionSubjectPermissionResponse is the response message for the SubjectPermission method in the Permission service.
Map of results for each permission check.
Show child attributes
Show child attributes