这是我的错误: 运行模拟错误—错误:Simulator.rules第[10]行,第[13]列。找不到函数错误:名称:[get]。错误:提供了无效的参数来调用。函数:[get],参数:[“ || invalid_argument ||”]
当我运行此程序时,我已经用尽了我在网络上可以找到的所有资源,却找不到任何可以使用的资源(当我只使用isSignedIn()时,允许读取的工作和创建的工作)...一点帮助。
service cloud.firestore {
match /databases/{database}/documents{
match /users/{documents} {
function isSignedIn() {
return request.auth != null;
}
function getRole(admin){
return get(/databases/$(database)/documents/users.[request.auth.uid]).data.admin;
}
allow read: if true;
allow write: if getRole(admin) == true;
}
}
}Run Code Online (Sandbox Code Playgroud)