On the parse server rest API guide is mentioned that the pointer permission is a class level permission, and there is a small sample, but is not specified where is placed:
(在解析服务器上,其余的API指南提到了指针权限是类级别的权限,并且有一个小示例,但未指定放置位置:)
Pointer permissions are a special type of class-level permission that create a virtual ACL on every object in a class, based on users stored in pointer fields on those objects.
(指针权限是一种特殊的类级别权限,它基于存储在这些对象的指针字段中的用户,在类中的每个对象上创建虚拟ACL。)
For example, given a class with an owner field, setting a read pointer permission on owner will make each object in the class only readable by the user in that object's owner field. (例如,给定一个具有所有者字段的类,对所有者设置读取指针权限将使该类中的每个对象仅可由该对象的所有者字段中的用户读取。)
For a class with a sender and a reciever field, a read pointer permission on the receiver field and a read and write pointer permission on the sender field will make each object in the class readable by the user in the sender and receiver field, and writable only by the user in the sender field. (对于具有发送方和接收方字段的类,接收方字段上的读取指针权限以及发送方字段上的读写指针权限将使用户可以在发送方和接收方字段中读取该类中的每个对象,并且可写仅由用户在发件人字段中。)
Pointer permissions are like virtual ACLs.
(指针权限类似于虚拟ACL。)
They don't appear in the ACL column, but if you are familiar with how ACLs work, you can think of them like ACLs. (它们不会出现在“ ACL”列中,但是如果您熟悉ACL的工作原理,则可以将它们视为ACL。)
In the above example with the sender and receiver, each object will act as if it has an ACL of: (在上面的带有发送方和接收方的示例中,每个对象的行为就像其ACL为:)
{
"<SENDER_USER_ID>": {
"read": true,
"write": true
},
"<RECEIVER_USER_ID>": {
"read": true
}
}
Note that this ACL is not actually created on each object.
(请注意,实际上并未在每个对象上创建此ACL。)
Any existing ACLs will not be modified when you add or remove pointer permissions, and any user attempting to interact with an object can only interact with the object if both the virtual ACL created by the pointer permissions, and the real ACL already on the object allow the interaction. (添加或删除指针权限时,任何现有的ACL都不会被修改,并且任何试图与对象进行交互的用户都只能在指针权限创建的虚拟ACL和对象上已经存在的实际ACL都允许的情况下与该对象进行交互。互动。)
ask by iuzzef translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…