@Danp
I have two users test.irtaza
, testirtaza1
in a resource set named customer
. And when login any of the account this is the output of resourceSet.getAll
login via test.irtaza
{
"id": -9007199254740984,
"jsonrpc": "2.0",
"result": [
{
"id": "V7Gr0uoqGwE",
"ipPools": [],
"limits": {
"cpus": {
"usage": 1
},
"disk": {
"usage": 10737418240
},
"memory": {
"usage": 4294967296
},
"vms": {
"usage": 1
}
},
"name": "customer",
"objects": [
"d4515c45-71ca-7675-ea70-0fe0a8f7dbe4-7aa32be8-a06c-4ade-8a1d-49e51e03e9d2",
"d4515c45-71ca-7675-ea70-0fe0a8f7dbe4-09d6b4cc-dd4b-4619-aacb-01576ccd5b0f",
"20e6d987-f8cb-d1b6-2b49-744a87358ae3",
"ca780b00-fd77-4a2a-fbb2-6f2859e6b4a7"
],
"subjects": [
"78f3286b-f4a1-4ba5-80a4-bda4967d47a8"
],
"shareByDefault": false,
"tags": []
}
]
}
login via testirtaza1
{
"id": -9007199254740984,
"jsonrpc": "2.0",
"result": [
{
"id": "V7Gr0uoqGwE",
"ipPools": [],
"limits": {
"cpus": {
"usage": 2
},
"disk": {
"usage": 21474836480
},
"memory": {
"usage": 8589934592
},
"vms": {
"usage": 2
}
},
"name": "customer",
"objects": [
"d4515c45-71ca-7675-ea70-0fe0a8f7dbe4-7aa32be8-a06c-4ade-8a1d-49e51e03e9d2",
"d4515c45-71ca-7675-ea70-0fe0a8f7dbe4-09d6b4cc-dd4b-4619-aacb-01576ccd5b0f",
"20e6d987-f8cb-d1b6-2b49-744a87358ae3",
"ca780b00-fd77-4a2a-fbb2-6f2859e6b4a7"
],
"subjects": [
"78f3286b-f4a1-4ba5-80a4-bda4967d47a8",
"f2858952-b02a-403a-98ca-d94e4cdaa57e"
],
"shareByDefault": false,
"tags": []
}
]
}
is the array of subjects
are the users and array of objects
are those things which these subjects
have access on?
Also
session.signIn
method returns the id of user
{
"id": -9007199254740991,
"jsonrpc": "2.0",
"result": {
"id": "f2858952-b02a-403a-98ca-d94e4cdaa57e",
"email": "testirtaza1",
"groups": [],
"permission": "none",
"preferences": {}
}
}
and, acl.getCurrentPermissions
method returns those things which belongs to the current loggedIn user?
to call acl.getCurrentPermissions
method we have signin by the user credentials(username,password/token)
{
"id": -9007199254740711,
"jsonrpc": "2.0",
"result": {
"58fdee6c-ed56-8a83-31d5-505748165658": {
"view": 1,
"operate": 1,
"administrate": 1
},
"89fd8cc9-6fa1-a7cb-a492-19eefd689631": {
"view": 1,
"operate": 1,
"administrate": 1
}
}
}
means I have to create the user first then store these credentials at my space so that I can call acl.getCurrentPermissions
method and get his VM's and then list those vm's to my portal and allow him to manage their vms from my custom built portal? Is my thinking is correct?