This reverts commit 9b7e75a616. Patching function hasPermission is not enough. A fix will follow.
9b7e75a616