How can we restrict client write access to an entity object?
For player data there is Player, Internal, ReadOnly.
Thanks
How can we restrict client write access to an entity object?
For player data there is Player, Internal, ReadOnly.
Thanks
To deny the player’s write access to their specific Entity Object, you would need to add the corresponding Global Policy to the title. You can set the global policy in the Game Manager or using API SetGlobalPolicy. You can check the API reference for the more description of the permission statement. If you want to set it in the Game Manager, you can find the [ENTITY GLOBAL TITLE POLICY] in [Game Manager]->[Title settings]->[API Features] page. (https://developer.playfab.com/en-US/r/t/[YourTitleId]/settings/api-features)
Please refer to the following policy to add the “deny” policy for the specific Entity Object. This policy would only allow title to edit the player’s specific Entity Object. Please replace [YourEntityObjectName] with the actual entity object name.
{ "Resource": "pfrn:data--*!*/Profile/Objects/[YourEntityObjectName]", "Action": "Write", "Effect": "Deny", "Principal": "*", "Comment": "Only title can edit user [YourEntityObjectName] Objects", "Condition": { "CallingEntityType": "title_player_account" } }, { "Resource": "pfrn:data--*!*/Profile/Objects/[YourEntityObjectName]", "Action": "Write", "Effect": "Deny", "Principal": "*", "Comment": "Only title can edit user [YourEntityObjectName] Objects", "Condition": { "CallingEntityType": "character" } }, { "Resource": "pfrn:data--*!*/Profile/Objects/[YourEntityObjectName]", "Action": "Write", "Effect": "Deny", "Principal": "*", "Comment": "Only title can edit user [YourEntityObjectName] Objects", "Condition": { "CallingEntityType": "master_player_account" } }
Thanks, how does the path for resource work for entities?
Looking at the doc I see
I am using the title_player_account so I thought it would be /Profile/Objects/title_player_account/[YourEntityObjectName]
Entity types should be set with CallingEntityType field. You can find it in the example.
3 People are following this question.