Revert: #671 New sql files for refactored permissions and handler for fetching only the friendly permissions (d3d1956866e578a7907f550a73d56aff5cc18799)