I just upgraded to 2.0.3. Now when I create a new Role then modify the code and hit Save, the edits won’t save. Looking directly in the roles.ps1 file, I can see that the role is created, but the only content within -Policy is “# Define your policy here”. When I hit ‘save’ in the GUI, the file gets modified, but the contents remain the same.
The behavior is the same for roles we’ve had for a long time - changes I make and save in the GUI will not persist.
I am using my AD account, which is an admin. Or at least, I set it to Administrator under Identities. I also seem to have complete access to everything in the admin console, so I am pretty sure I am an admin.
Since my last post my troubles have deepened. I edited the roles.ps1 file directly to add the code since I couldn’t in the GUI. The role shows up with the code now in the GUI - but ALL roles are now broken! I’ve had to remove authentication from all my dashboards, which is obviously not an ideal situation. I double-checked the code and I don’t see any errors - it’s a copy/paste from another role I know was previously working.
Then I enable Auth on a dashboard and assign that role. As soon as I do that, I can no longer access the dashboard. This code worked before my upgrade… pretty sure I was on 1.5.18 before.
Just for good measure, I also tried this, with the same result (the Unauthorized page)
I added a line inside New-PSURole to write to a text file before it returns $true. The text file is not created. It seems like PSU is not even executing the code.
Here are the log entries from when I try to access a page with auth turned on and the TestDashUser role applied to it:
I’ll take a look but one thing you can try is to increase the log level to debug to see which roles are being evaluated. I realize you may not have time to try to upgrade again but if you do, please try that.