Activate / Deactivate scopes in router from config

How could I configure such a pipeline to check in the config if it has the right to forward or not ?