现在用火力认证,我是指这个link火力地堡用户PERMISSION_DENIED:权限被拒绝
"users": {
".read": "auth != null && root.child('admins').child(auth.uid).val() == true",
".write": "auth != null && (root.child('admins').child(auth.uid).val() == true)",
"$uid": {
".read": "auth != null && (auth.uid == $uid || root.child('admins').child(auth.uid).val() == true)",
".write": "auth != null && (auth.uid == $uid || root.child('admins').child(auth.uid).val() == true)"
}
},
这是我的火力用户表的规则。
我services.js
signupUser: function(newUser) {
var secondaryApp = firebase.initializeApp(FirebaseAppConfig, "Secondary");
var usersRef = firebase.database().ref().child('users');
return secondaryApp.auth()
.createUserWithEmailAndPassword(newUser.email, newUser.password)
.then(function(firebaseUser) {
secondaryApp.auth().signOut();
var newUserWithoutPwd = _.extend({}, newUser);
delete newUserWithoutPwd.password;
return usersRef
.child(firebaseUser.uid)
.set(newUserWithoutPwd)
.then(function() {
return newUserWithoutPwd;
});
});
},
Authendication是成功的。但用户表显示权限被拒绝错误。
显示屏幕下方打出
基于你怎么想的是,用户有权写? –