Representing each capability as a separate field in the FMP API makes communicating and storing these capabilities unecessarily verbose.
Instead, store them as one field (e.g. |capabilityFlags|), and have helper methods in the JS/C++ to convert this integer back to a map of bools.
Also, in:
constants.LIST_CONTAINER_METADATA_PREFETCH_PROPERTY_NAMES
instead of storing:
canCopy
canDelete
canRename
canAddChildren
canShare
just store:
capabilityFlags
Which can contain a single integer (convertible to an object of booleans) that represents the permissions for that entry.
Comment 1 by sashab@chromium.org
, Jun 6 2018