Check permissions in MergeItems..

Change-Id: I6ed988023fedf872a9620fbed1bee342bd80155c
Remove unused $restore from PermissionsTest

Change-Id: I68c37f6120f57c23246945f7e0068eb9206b74df
Merge changes I68c37f61,I6ed98802

* changes:
  Remove unused $restore from PermissionsTest
  Check permissions in MergeItems..