DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Editing Razor Host script

 5 Replies
 0 Subscribed to this topic
 30 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 26
New Around Here

Hi,

in a page I write a razor host script (Settings > Extension > Razor Host): it works great...but only Super User can edit the script. Why?

I try to define custom authorization to editing the module without success: can anyone point me in the right direction?

Thanks,

progmr

Senior Member
Posts: 1607
Senior Member
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!
Posted By progmr on 5/29/2024 7:41 AM

Hi,

in a page I write a razor host script (Settings > Extension > Razor Host): it works great...but only Super User can edit the script. Why?

I try to define custom authorization to editing the module without success: can anyone point me in the right direction?

Thanks,

progmr

The ability to introduce source code that can run server-side operations is an incredibly high risk thing to allow.  For this reason, traditionally only a superuser account can do such operations. 

 

Veteran Member
Posts: 360
Veteran Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
In short, RazorHost implementations are only editable by a super user. That said, we don't recommend using RazorHost. You can do much more in the context of a custom module or a structured content solution that uses Razor (e.g., 2sxc).

David Poindexter


Creator:


Advanced Member
Posts: 208
Advanced Member
Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
MVP
MVP
You're an MVP!
New Poster
New Poster
Congrats on posting!

There are other options for module you can use.

https://2sxc.org/en/
https://opencontent.readme.io/
https://www.rocket-cds.org/

We use Rocket, but it's less known and documentation is ongoing.

However in response to you question about allowing users to use razor, I suggest you NEVER allow that, just the superuser. As Will pointed out there are very high risk security risks.

New Around Here
Posts: 26
New Around Here

Thanks for your suggestions, I'm going to try them

progmr

Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!
Posted By progmr on 5/31/2024 1:25 PM

Thanks for your suggestions, I'm going to try them

progmr

If you need some Open Content examples you can find them here: https://github.com/40fing...ntent-Demo-Templates

 

 

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved