Hi Stefan,
In the link shared by Brenden, there is a sample how to check the modify permission, however, you need to get the document(s) first and then check the permissions for each individually since the pemrissions can be set per page:
// Checks whether the user has the Modify permission for the Example page
if (page.CheckPermissions(PermissionsEnum.Modify, SiteContext.CurrentSiteName, user))
{
// Perform an action according to the result
return true;
}