Limit flutter中每个用户firebase和firestore读取的数据计数
我正在开发一个应用程序,通过Firebase向注册用户提供托管在AWS虚拟机上的业务报告,并在Firestore中提供用户配置文件。每次用户进行查询时,其Firestore配置文件中的查询数量都会增加(代码随附)。我需要用户每天的查询不能超过10次。。我怎么做 代码:Limit flutter中每个用户firebase和firestore读取的数据计数,firebase,flutter,google-cloud-firestore,firebase-authentication,Firebase,Flutter,Google Cloud Firestore,Firebase Authentication,我正在开发一个应用程序,通过Firebase向注册用户提供托管在AWS虚拟机上的业务报告,并在Firestore中提供用户配置文件。每次用户进行查询时,其Firestore配置文件中的查询数量都会增加(代码随附)。我需要用户每天的查询不能超过10次。。我怎么做 代码: child: FlatButton( color: Colors.transparent, child: Text( 'Process', style: Te
child: FlatButton(
color: Colors.transparent,
child: Text(
'Process',
style: TextStyle(color: Colors.white),
),
onPressed: () async {
final FirebaseUser user =
await _auth.currentUser();
var loginSuccess = await model
.getdata(_inputCuit.text);
if (loginSuccess) {
Firestore.instance
.collection("users")
.document(user.uid)
.updateData({
"queries": FieldValue.increment(1)
});
Navigator.pushNamed(context, 'post',
arguments: model.info);
安全规则中没有办法限制用户的读取次数。如果这是您的用例的要求,那么您必须在云函数或其他可信环境中实现读取