Upgrading to permissions2. API stays the same.
Updated the example