Authentication in scripts? (no script data in pages table for custom roles)

Hi,
I made a simple page, on it I have a table that displays the output of a script.
Authentication is enabled on the page, and includes the builtin administrator role, and a custom “User” role based on a Group membership claim.

Works fine, besides the fact that the “User” just gets an empty table, whereas the ‘Administrator’ table is populated just fine.

If I add the actual user to any of the built in roles (like Reader), it works.

Might be the same going on here - PS Universal Page not displaying PS Script data table from output - Universal Dashboard / Universal Dashboard Help - Ironman Software Forums

Product: PowerShell Universal
Version: 2.9.2

You’ll need to use access controls to provide the user access to that script. I’m going to open an issue for this because we shouldn’t just display nothing when access fails.

We are adding Access Control UI in v3 which should make this much easier to configure.

2 Likes

this, i see?
Access Controls - PowerShell Universal

Thanks!

Seeing some inconsistincies with this.

Created a tag in the UI called “ITInfrastructureView” added the tag to 2 scripts that is used in 2 tables (on seperate pages)

Created an acessControl, on a role “NorlysVisitors” my user is a member of

$Type = ([PowerShellUniversal.AccessControlType]::View)
New-PSUAccessControl -Role ‘NorlysVisitors’ -Tag ‘ITInfrastructureView’ -Type $Type

I can still not see data on the table with the initial issue, but I can on the second one.

@adam
I seem to have found some logic in the inconsistensy.

If I make a new script, with the same code, same tag, same environment in the root Scripts folder - it works for the “restricted” User (it always works for Administrators and members of other built in groups).

but if the same script is made inside a folder, then it bugs out. the “symptom” (besides an empty table), is about 20 seconds of a loading icon - whereas the data loads instantly for users in built in roles.

Sounds like a bug. Thanks for tracking down a good repro step. I’ll open an issue to get this resolved in 2.10.

1 Like

Didn’t see this in the changelog, but the issue is closed - heres hoping.

I’m gonna canary this release by installing on day one :smiley:

Edit Indeed it works

1 Like