Add filter for permissions

We need ability to filter permissions based on privileges.
Support for 'admin', 'pull' and 'push' is added.