added setPermissions test
This commit is contained in:
parent
86748b97e0
commit
ee6b9f0050
1 changed files with 30 additions and 1 deletions
|
@ -139,7 +139,7 @@ const list = [
|
|||
accountKey: accountKey + "lol"
|
||||
}, "error", "auth");
|
||||
}], ["admin", async (req) => {
|
||||
await req({
|
||||
let resp = await req({
|
||||
"authorization": `Digest name=${name1} server=localhost:7224 accountKey=${accountKey}`
|
||||
}, "getAccounts", {}, "ok", [
|
||||
{
|
||||
|
@ -162,6 +162,35 @@ const list = [
|
|||
maxUsersPerRoom: 2
|
||||
}
|
||||
]);
|
||||
await req({
|
||||
"authorization": `Digest name=${name1} server=localhost:7224 accountKey=${accountKey}`
|
||||
}, "setPermissions", {
|
||||
accID: resp[1].accID,
|
||||
rights: 5
|
||||
}, "ok", "");
|
||||
await req({
|
||||
"authorization": `Digest name=${name1} server=localhost:7224 accountKey=${accountKey}`
|
||||
}, "getAccounts", {}, "ok", [
|
||||
{
|
||||
accID: 1,
|
||||
rights: 65535,
|
||||
name: "testUser1",
|
||||
viewable: true,
|
||||
deleted: false,
|
||||
maxRooms: 2,
|
||||
maxRoomSize: 10,
|
||||
maxUsersPerRoom: 2
|
||||
}, {
|
||||
accID: null,
|
||||
rights: 5,
|
||||
name: "testUser2",
|
||||
viewable: true,
|
||||
deleted: true,
|
||||
maxRooms: 2,
|
||||
maxRoomSize: 10,
|
||||
maxUsersPerRoom: 2
|
||||
}
|
||||
]);
|
||||
}], ["room Owner", async (req) => {
|
||||
await req({
|
||||
"authorization": `Digest name=${name1} server=localhost:7224 accountKey=${accountKey}`
|
||||
|
|
Loading…
Reference in a new issue