الأدوار والصلاحيات والأذونات
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
model who may do what.
الموضوعات المخطط لها
- An authority is one permission string, such as
ORDER_READ. - A role is a named group of permissions, such as
ADMIN; in Spring a role is an authority with theROLE_prefix. - RBAC (role-based access control): assign roles to users, and check roles.
- Keep roles few and meaningful (customer, admin); add finer permissions only when needed.
- A role says what kind of action is allowed, not which records.
تفاصيل المخطط المبدئي
عرض عملي
a table: role / authorities / example endpoints.
اختبر فهمك
Does a role decide which orders a customer can see?
أظهر الإجابة
No. That needs an ownership check.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.