Update page file from another page\dashborad

Update page file from another page\dashborad

avatar
Product: PowerShell Universal
Version: 4.0.0-beta5


Hello
Since Im using role authorization on page level rather than dashboards, the only way to assign role is to make a change in page code.
Its king of frustrating , so I wrote another dashboard called “ADMIN” that allows me to read, add and remove roles for given page.
Its working in overall but the last step in this code its not
Im not able to save modified content of page file back to disk
When i save it to new file it works
When i want to save to page file it throws an error:

An error occurred: Stream was not readable.


Any way to achieve this ?

All Comments (1)

avatar

ok looks like i found solution: [System.IO.File]::WriteAllText method does the trick