Roles trough windows auth?

Product: PowerShell Universal
Version: 1.5.0 nightly build somewhere from late October 
Product: Universal Dashboard
Version: 2.9.6

Hello. Need some help setting up the roles for users that login on universal dashboard in order to restrict their access to certain pages in UD.
I’m running UA as a service under a service account with Windows Auth.

What i’m basically trying to achieve is:
User visits the dashboard
I get the logged in user (done)
Assign a role of admin or user based on if he is in AD group or not
Based on the role that the user has, i want to restrict the view of some pages and some functions on pages that all users have access.

Also, is there a way I can restrict the users so that they can’t access the /admin dashboard ?
Thanks.

We have an example of assigning roles based on group membership here: https://docs.ironmansoftware.com/config/security#example-policy-based-on-active-directory-group-membership

You can then assign the role to the page: https://docs.ironmansoftware.com/dashboard/components/pages#role-based-access

We have added the ability to restrict the admin dashboard to only built-in roles in 1.5 a couple days ago. 1.5 is scheduled to be released next week.

I have to second that first question. (using 1.4.9)

in roles.ps1 I determine if the user should be admin:

param(
        $User
    )
    if ((Test-MemberOfPUAdmin -UserName ($User.identity.name.replace("domain\", ""))) -eq $true) {
        $return = $true
    }
    else {
        $return = $false
    }
    $return

which works.
But in a dashboard contain this:

New-UDDashboard -Title "Hello, World!" -Content {
    New-UDTypography -Text $($Roles) -Align center
    New-UDTypography -Text $($user) -Align center

}
I get the username from $user, but nothing from $Roles to base the the page-content on.
What am I missing?

Edit: in fact, the dashboard itself requires authentication and the administrator role, but still accessible for a non-admin