writepermissions on data buckets and their relationships when querying
writeattributes can be specified for the root object, by adding the a
roottag inside a
<root read="any" write="update,delete" />
write="none"on this global bucket, its data is synced to all users and they have read-only access.
read="none"rule on the data bucket that provides write access for admins, since another data bucket already allows synching and unrestricted read access to these objects for all users (including admins).
region, and the region
clients. Users have unrestricted access to their region's clients, but cannot update their own region (and thereby access other region's clients). However, they can create new regions.
OnlineDBaccess is limited to synced data by default
OnlineDBaccess is limited to data synced to the device (in other words, as previously specified in the app's sync rules).
OnlineDB, regardless of the model being included in
sync_rules.xml. With data rules, only the data specified in
data_rules.xmlis accessible with
OnlineDBquery would not return any results. Read or write access to
OnlineDBwould need to be explicitly defined within data rules to support the above query:
createoperations it’s only the after state that is validated.
jobas complete, the job would no longer be accessible to the user, as only incomplete jobs are synced to the device. With sync rules, this kind of update is supported. With data rules, however, since the user would no longer have access to the job after this update (of setting the
data_rules.xmlwould enable updates to a
OnlineDBcalls and queries. The below section on what happens when access is denied, should also help with these tests.
save()operations will throw an "Access denied" error.
destroy()operations will appear to work, but the data will not be touched.
OnlineDBqueries will exclude the results.
save()operations will show an "Access denied" error in the developer console (in JourneyApps Runtime version 4.85.0 and greater).
read="offline"set. These data rules take effect immediately after deploying an update.