Get all users with edit/view permission for a node
Every content type has fix pattern of permission

For node edit permission, Just use user_access() with string parameter
"edit own [content-type] content"
OR
"edit any [content-type] content"
If current user has this permission it return TRUE else FALSE

AND

If you want this permission for other user, Just pass user object as second argument in user_access()