How to manage the visibility of document by its permission or any using dotcmis dll file.
and how to get all list of users in alfresco by querying it.
You can get or set an object's permission by using method GetAcl/ApplyAcl of ISession.
To find a user or a set of users via a CMIS query,you can do it like this
IItemEnumerable<IQueryResult> qr1 = session.Query("SELECT * FROM cmerson", false);
Or select some fields for users with where condition
IItemEnumerable<IQueryResult> qr1 = session.Query("SELECT cm:userName, cm:homeFolder FROM cmerson where cm:userName like 'ttt%'", false);