2016-11-25 82 views
1

我尝试在Firebase上设置规则,如果uid(abc_x)=== $ account(abc_y),它可以读取数据并且每个人都可以插入,更新数据。但是当我使用的交易,它的报告“错误:PERMISSION_DENIED”Firebase - 交易规则

"countchat":{ 
    "$account": { 
     ".read": "$account === auth.uid", 
     ".write": "auth != null", 
    } 
    }, 
+0

如果@ cartant的回答没有解决您的问题,分享[最少的代码能重现问题] (http://stackoverflow.com/help/mcve)。 –

回答

2

documentation

When using transactions with Security and Firebase Rules in place, be aware that a client needs .read access in addition to .write access in order to perform a transaction.