Passing parameters from route definition

Hello,

Using Vue3. I want to set roles allowed in the routes definition, then use that value in beforeRouteEnter. Something like:

{
    path: "secure/page",
    name: "SecurePage",
    component: SecurePage,
    params: {role: admin},
}

Then

const guard = {
    template: `...`,
    beforeRouteEnter (to, from, next) {
        next(vm => {
            if( 'admin' === vm.$route.params.role) {

            }
        })
    },
}

As it doesn’t work. Is it possible in any way ?

How could I have missed that… Routes meta is the answer.