added a factory to retrieve all permissions and also configured it via requirejs