umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.36k stars 2.64k forks source link

Templates can still be editable when using runtime mode Production #16622

Open NguyenThuyLan opened 1 week ago

NguyenThuyLan commented 1 week ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

14.0.0

Bug summary

Templates in the BackOffice can still be editable when using runtime mode Production

Specifics

The template in BackOffice (live env) can still be editable when using runtime mode Production

image

Templates are not supposed to be editable on live env as runtime compilation is not enabled and is set to Production.

Steps to reproduce

Configuring the runtime mode: Production Follow these steps from https://docs.umbraco.com/umbraco-cms/fundamentals/setup/server-setup/runtime-modes.

  1. Config runtime mode to enable Development mode
  2. Remove 2 properties from csproj project file: RazorCompileOnBuild and RazorCompileOnPublish
  3. Enable Production mode in appsettings.Production.json
  4. Open one template file in BackOffice (Live Environment), templates can still be editable

Expected result / actual result

Templates cannot be edited on live environment as runtime compilation is not enabled and is set to Production.

image