منع سحب أو مسح الجذر
إغلاق القراءة والكتابة العامة على الجذر الرئيسي (.read: false, .write: false).
عزل المستخدمين والطلبات
منع المتطفلين من قراءة جدول users أو customOrders، والسماح للعميل بإرسال طلب جديد فقط.
بوابة كتابة مشفرة مؤقتة
لا يُسمح بتعديل أو حذف الأقسام والفروع والمنتجات إلا عبر مفتاح الأمان المؤقت للوحة التحكم.
{
"rules": {
".read": false,
".write": false,
"_security": {
".read": false,
".write": "newData.exists() && newData.child('key').isString() && (newData.child('key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' || newData.child('key').val() === 'LOCKED')"
},
"categories": {
".read": true,
".write": "root.child('_security/key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' && (now - root.child('_security/unlockedAt').val()) < 20000",
"$catId": {
".validate": "newData.hasChildren(['id', 'key', 'name']) && newData.child('name').isString() && newData.child('name').val().length > 0 && newData.child('name').val().length <= 120"
}
},
"branches": {
".read": true,
".write": "root.child('_security/key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' && (now - root.child('_security/unlockedAt').val()) < 20000",
"$branchId": {
".validate": "newData.hasChildren(['id', 'name', 'city', 'phone']) && newData.child('name').isString() && newData.child('name').val().length > 0 && newData.child('name').val().length <= 150"
}
},
"products": {
".read": true,
".write": "root.child('_security/key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' && (now - root.child('_security/unlockedAt').val()) < 20000",
"$prodId": {
".validate": "newData.hasChildren(['id', 'name', 'category', 'img']) && newData.child('name').isString() && newData.child('name').val().length > 0 && newData.child('name').val().length <= 200"
}
},
"customOrders": {
".read": "root.child('_security/key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' && (now - root.child('_security/unlockedAt').val()) < 20000",
".write": "root.child('_security/key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' && (now - root.child('_security/unlockedAt').val()) < 20000",
"$orderId": {
".write": "(!data.exists() && newData.exists()) || (root.child('_security/key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' && (now - root.child('_security/unlockedAt').val()) < 20000)",
".validate": "newData.hasChildren(['id', 'customerName', 'customerPhone', 'serviceType', 'branchName', 'status']) && newData.child('customerName').isString() && newData.child('customerName').val().length > 0 && newData.child('customerName').val().length <= 150 && newData.child('customerPhone').isString() && newData.child('customerPhone').val().length > 0 && newData.child('customerPhone').val().length <= 40"
}
},
"users": {
".read": "root.child('_security/key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' && (now - root.child('_security/unlockedAt').val()) < 20000",
".write": "root.child('_security/key').val() === 'LADUZA_SEC_KEY_2026_9X7M4P2Q' && (now - root.child('_security/unlockedAt').val()) < 20000",
"$userId": {
".validate": "newData.hasChildren(['id', 'name', 'username', 'password', 'role']) && newData.child('username').isString() && newData.child('username').val().length > 0 && newData.child('username').val().length <= 80"
}
}
}
}
حسابات التواصل الاجتماعي الموحدة
تجدون حلويات لدوزا على كافة المنصات بنفس المعرّف الموحد: @Laduza.sa
إنستغرام
@Laduza.sa
تيك توك
@Laduza.sa
سناب شات
@Laduza.sa