There is a function zp_loggedin() which will return the rights list of the logged-in user (of false if there is no logged-in user.) Beyond that there are object methods to check right to do something on the object. Look for isMyItem() in the documentation.