1

Rigts asignation over a device

Topic: Rigts asignation over a device

Hello

i am testing how to add rights on a user and I made this chain:

Url: https://hst-api.wialon.com/wialon/ajax. … mp;params=[{"svc":"user/update_item_access","params":{"userId":18701505,"itemId":16949629,"accessMask":"0x0001"}},{"svc":"user/update_item_access","params":{"userId":18701505,"itemId":16949629,"accessMask":"0x0002"}},{"svc":"user/update_item_access","params":{"userId":18701505,"itemId":16949629,"accessMask":"0x0020"}},{"svc":"user/update_item_access","params":{"userId":18701505,"itemId":16949629,"accessMask":"0x0200"}},{"svc":"user/update_item_access","params":{"userId":18701505,"itemId":16949629,"accessMask":"0x4000"}}]&sid=

answer: "[{},{"error":6},{"error":6},{"error":6},{"error":6}]

any idea why?

thanks ( result: http://prntscr.com/mf850t)

Locating things
2

Rigts asignation over a device

Re: Rigts asignation over a device

You cannot set access non-zero access flags without flag 1.

Try 0x21, 0x201, 0x4001...

Also, if you are setting access flags to the same user-item pair, you need to apply Binary OR (0x1 | 0x2 | 0x20 | 0x200 | 0x4000 = 0x4223), else latest update will override all previous.