isMember(A,role(pAlpha,access,read,C),B) :-
   isMember(A,role(pAlpha,team,E),D),
   appendL([['W2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLnJvbGU6YWNjZXNzKFtzdHJpbmc6J3JlYWQnXSxbdXJuOj9Ge1trZXlpZDo3NDBiMDFjOTk4ZDIxZmE5ZWNmZWUyY2ZmMjVkZDhiMzg5OTg2YzAzXS5vc2V0OmRvY3VtZW50cyhbc3RyaW5nOj9QXSl9XSkgPC0gW2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLnJvbGU6dGVhbShbc3RyaW5nOj9QXSk='],F,D],B),
   isType(pAlpha,keyid),
   isMember(C,oset(pAlpha,documents,E),F).
isMember('file//fileA',oset(pAlpha,documents,proj1),['W2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLm9zZXQ6ZG9jdW1lbnRzKFtzdHJpbmc6J3Byb2oxJ10pIDwtIFt1cm46J2ZpbGUvL2ZpbGVBJ10=']) :-
   isType(pAlpha,keyid).
isMember(pBob,role(pAlpha,team,proj1),['W2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLnJvbGU6dGVhbShbc3RyaW5nOidwcm9qMSddKSA8LSBba2V5aWQ6YWY0MGQ3N2Y1YjMwYTk3OTQ4NGY4YmJiZmI0MDg0MDgxN2EzM2E2N10=']) :-
   isType(pAlpha,keyid),
   isType(pBob,keyid).
isMember(pJoe,role(pAlpha,team,proj2),['W2tleWlkOjc0MGIwMWM5OThkMjFmYTllY2ZlZTJjZmYyNWRkOGIzODk5ODZjMDNdLnJvbGU6dGVhbShbc3RyaW5nOidwcm9qMiddKSA8LSBba2V5aWQ6N2Y1YzY4YzEyNTUxZmI2NmU3YmYxNWVmMzY0YjQ2MjI1NDE5MDkzYl0=']) :-
   isType(pAlpha,keyid),
   isType(pJoe,keyid).
isType(pAlpha,keyid).
isType(pBob,keyid).
isType(pJoe,keyid).
appendL([],[]).
appendL([B|C],A) :-
   appendL(C,D),
   append(B,D,A).
append([],A,A).
append([B|C],A,[B|D]) :-
   append(C,A,D).

