Topic: Item access

I have used below API to get access level of type("avl_unit"), its returning computed dacl accessMask value. How to split this accessmask?
I want to check whether this user have access to delete item(0x0008) or not.
svc=user/get_items_access&params={
"userId":'',
"directAccess":'1',
"itemSuperclass":'avl_unit',
"flags":<uint>}

Thanks
J Prabhu
2

Item access

Re: Item access

prabhu.janakiraman, you can just check does this computed value contain certain bit (in your case 0x0008).
In Javascript and most programming languages this can be made like this:

if (dacl & 8) {/* user can delete unit, do smth */}
Head of Wialon Local Department
Gurtam

Re: Item access

Thanks a lot deal

Thanks
J Prabhu