skygear-SDK-JS icon indicating copy to clipboard operation
skygear-SDK-JS copied to clipboard

Remember and apply default ACL settings to records

Open cheungpat opened this issue 7 years ago • 0 comments

When calling setRecordDefaultAccess the SDK should remember the settings and apply default ACL settings to record when needed (see below). The default ACL settings does not need to persist across application relaunch because it is expected that the developer will always call this function when the app launches.

The default ACL should not be applied to a record when it is instantiated. The default ACL should only apply when the the developer tries to mutate the record ACL.

When default ACL for the record type is not defined, the fallback ACL will apply. The fallback ACL is public-readable.

If record ACL is null, getting the record ACL will not cause the record ACL to change. Return the default ACL or fallback ACL in this case.

In earlier versions of the SDK, (set|get)DefaultACL sets and gets the default ACL that applies to all record types. These functions should be retained but deprecated. These functions should alter the fallback ACL. In other words, calling these functions will override the fallback ACL of public-readable.

cheungpat avatar Apr 28 '17 10:04 cheungpat