示例#1
0
 public IEnumerable <Models.HtmlText> Get(string moduleId)
 {
     if (int.TryParse(moduleId, out int ModuleId) && AuthEntityId(EntityNames.Module) == ModuleId)
     {
         return(_htmlText.GetHtmlTexts(ModuleId));
     }
     else
     {
         _logger.Log(LogLevel.Error, this, LogFunction.Security, "Unauthorized Html/Text Get Attempt {ModuleId}", moduleId);
         HttpContext.Response.StatusCode = (int)HttpStatusCode.Forbidden;
         return(null);
     }
 }