[Filesystem] Used private object to check privilege.
authorTomasz Marciniak <t.marciniak@samsung.com>
Thu, 5 Nov 2015 11:46:58 +0000 (12:46 +0100)
committerTomasz Marciniak <t.marciniak@samsung.com>
Thu, 3 Dec 2015 08:45:17 +0000 (09:45 +0100)
commit766860adbab77b2229eef504d741c928b915a0a0
tree069936eea01cdbdcb066cb959aa05f1daf6d4e5c
parent1d55cd02ec72fef0c59b2f089dc03649d78debdd
[Filesystem] Used private object to check privilege.

This commit implements also changes from commit 133111ea646f29821a8af3eee32981d0de9b1c11

[Features] Implementation of Filesystem has been adjusted to new privilege policy.
All JS functions have been wrapped in order to use private function and hide implementation.
Local copy of of xwalk.utils and its sub objects has been added to prevent overwriting.

Privilege check has to be done at the beginning of the executed function.
As some Filesystem functions execute callbacks before going down to C++ layer and
exclude checking privilege in C++ it is good idea to check privilege in JS layer.

[Verification] Code compiles. TCT pass rate 100%

Change-Id: Ia3996b03954bfd8241f9470399a25f0a216769be
Signed-off-by: Tomasz Marciniak <t.marciniak@samsung.com>
src/filesystem/filesystem_instance.cc
src/filesystem/js/common.js
src/filesystem/js/file.js
src/filesystem/js/file_stream.js
src/filesystem/js/file_system_manager.js