Update permissions module to use new api