I have a custom html resource that I would like to restrict to Administrators only and hide certain content if the user doesn't have Admin rights. Has anyone done this and be willing to share the html code?.
bump...anyone?
Well, it you can hack it little bit with some coding. I cannot send you proper files, as I don't know exact version you are using, but following steps may help you: (this is the simplest way)
1) go to c:\inetpub\solarwinds\orion\netperfmon\resources\misc, and there you can find UserHtml.ascx, and UserHtml.ascx.cs.
2) copy those files to some different folder (I used c:\inetpub\solarwinds\orion\netperfmon\resources\inventory)
3) Modify the UserHtml.ascx.cs in the resources\inventory subdirectory following way:
look up the Page_Load method, it should look like
protected void Page_Load(object sender, EventArgs e) {
something
}
if you add the
this.Visible = Profile.AllowAdmin;
line after first '{' to this function, you have the UserHtml resource that shows only for admin
4) you can add it then, from 'Customize view', but look into the category into which you copied the initial files,in my case they are in "Inventory - Various Network Inventory Reports"
note: this isn't exactly supported way how to hack NPM. :-)
Awesome! Works fantastic. Thank you Yossarian!
Now, if I could restrict the custom html resource to specific admins would be even more awesome. Do you know the code to do this?