انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-069-L07

عرض عملي: أداة حالة الطلب تحترم الملكية

  • الدرس 7 من 8
  • Mid-level
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

build a read-only tool that cannot leak another customer's order. Prepares MID-069-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Define get_order_status(orderId) with a typed schema.
  2. Execute it by calling orders with the customer's bearer token.
  3. Return a trimmed result or NOT_ALLOWED/NOT_FOUND (same shape for both, to avoid probing).
  4. Write the test: customer A asks for customer B's order and gets no data.
  5. Planned mistake: use a service account for the call; the test fails because B's order is visible. Fix by forwarding the user token.
  6. Show the trace of the call in logs without the token value.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.