code: public boolean hasPermissions(
          CmsResource resource,
          CmsPermissionSet requiredPermissions,
          boolean checkLock,
          CmsResourceFilter filter)
      throws CmsException {
  
          return I_CmsPermissionHandler.PERM_ALLOWED == m_securityManager.hasPermissions(
              m_context,
              resource,
              requiredPermissions,
              checkLock,
              filter);
      }
docs: Checks if the current user has required permissions to access a given resource.<p>
  
  @param resource the resource to check the permissions for
  @param requiredPermissions the set of permissions to check for
  @param checkLock if <code>true</code> the lock status of the resource is checked for write operations
  and the resource needs be locked by the current user so that the test is passed,
  if <code>false</code> the lock is not checked at all
  @param filter the resource filter to use
  
  @return <code>true</code> if the required permissions are satisfied
  
  @throws CmsException if something goes wrong