具有firebase中角色和类型的用户管理

时间:2017-02-24 23:31:20

标签: angular firebase firebase-authentication angularfire2

我正在使用angularfire2。我想知道用角色和类型管理用户的方法。 这是我的用户json数据。

boost::asio::local::stream_protocol::socket

我想用用户的角色和类型管理users表。 否则,用户表可以由具有相同类型的admin角色的用户编辑。如果用户的角色是admin并且他的类型与目标用户的角色不同,则他无法编辑目标用户表。

在规则中,我试过了。

"users": {
		"12321323432": {
			"email": "admin@gmail.com",
			"type": "staff1",
			"role": "admin"
		},
		"354323432": {
			"email": "test@gmail.com",
			"type": "staff2",
			"role": "user"
		}
	}

但是在发布规则时,我收到了这条消息。 “newData在.write表达式中无效。”

0 个答案:

没有答案