function modifyCap (origin, capUrl, target) {
  var token = extractToken(capUrl)
  if (!token) throw new Error('Invalid capability URL')
  var cap = capabilities.find(c => c.token === token)
  if (!cap) throw new Error('Capability does not exist')
  
  if (cap.owningOrigin !== origin) {
    throw new PermissionsError('Cannot modify unowned capability')
  }

  cap.target = parseTarget(target)
}
@param {String} origin
@param {String} capUrl
@param {String} target
@returns {Void}