privilege.md 3.0 KB

Privilege

grant

Add privileges

flow privilege grant -c fateflow/examples/permission/grant.json

Options

parameter name required type description
party_id yes string site id
component no string component name, can be split by "," for multiple components, "*" for all components
dataset no object list of datasets

sample

{
  "party_id": 10000,
  "component": "reader,dataio",
  "dataset": [
    {
      "namespace": "experiment",
      "name": "breast_hetero_guest"
    },
    {
      "namespace": "experiment",
      "name": "breast_hetero_host"
    }
  ]
}

return

parameter name type description
retcode int return code
retmsg string return message

Sample

{
    "retcode": 0,
    "retmsg": "success"
}

delete

Delete permissions

flow privilege delete -c fateflow/examples/permission/delete.json

Options

parameter name required type description
party_id yes string site_id
component no string component name, can be split by "," for multiple components, "*" for all components
dataset no object list of datasets, "*" is all datasets

sample

{
  "party_id": 10000,
  "component": "reader,dataio",
  "dataset": [
    {
      "namespace": "experiment",
      "name": "breast_hetero_guest"
    },
    {
      "namespace": "experiment",
      "name": "breast_hetero_host"
    }
  ]
}

return

parameter name type description
retcode int return code
retmsg string return message

Sample

{
    "retcode": 0,
    "retmsg": "success"
}

query

Query permissions

flow privilege query -p 10000

Options

parameters short-format long-format required type description
party_id -p --party-id yes string site id

returns

parameter name type description
retcode int return-code
retmsg string Return information
data object return data

Sample

{
    "data": {
        "component": [
            "reader",
            "dataio"
        ],
        "dataset": [
            {
                "name": "breast_hetero_guest",
                "namespace": "experiment"
            },
            {
                "name": "breast_hetero_host",
                "namespace": "experiment"
            }
        ]
    },
    "retcode": 0,
    "retmsg": "success"
}