removed method-level [ValidateAntiForgeryToken] attribute as it is now handled by global AutoValidateAntiforgeryTokenFilter, adjusted gitignore to improve filtering of Module and Theme folders in wwwroot and exclude all files in Oqtane.Server/Data
This commit is contained in:
parent
f6b3874668
commit
1c7380d4cf
11
.gitignore
vendored
11
.gitignore
vendored
|
@ -12,9 +12,7 @@ msbuild.binlog
|
||||||
*.idea
|
*.idea
|
||||||
|
|
||||||
Oqtane.Server/appsettings.json
|
Oqtane.Server/appsettings.json
|
||||||
Oqtane.Server/Data/*.mdf
|
Oqtane.Server/Data
|
||||||
Oqtane.Server/Data/*.ldf
|
|
||||||
Oqtane.Server/Data/*.db
|
|
||||||
|
|
||||||
/Oqtane.Server/Properties/PublishProfiles/FolderProfile.pubxml
|
/Oqtane.Server/Properties/PublishProfiles/FolderProfile.pubxml
|
||||||
Oqtane.Server/Content
|
Oqtane.Server/Content
|
||||||
|
@ -22,3 +20,10 @@ Oqtane.Server/Packages
|
||||||
Oqtane.Server/wwwroot/Content
|
Oqtane.Server/wwwroot/Content
|
||||||
Oqtane.Server/wwwroot/Packages/*.log
|
Oqtane.Server/wwwroot/Packages/*.log
|
||||||
|
|
||||||
|
Oqtane.Server/wwwroot/Modules
|
||||||
|
!Oqtane.Server/wwwroot/Modules/Oqtane.Modules.*
|
||||||
|
!Oqtane.Server/wwwroot/Modules/Templates
|
||||||
|
|
||||||
|
Oqtane.Server/wwwroot/Themes
|
||||||
|
!Oqtane.Server/wwwroot/Themes/Oqtane.Themes.*
|
||||||
|
!Oqtane.Server/wwwroot/Themes/Templates
|
||||||
|
|
|
@ -84,7 +84,6 @@ namespace Oqtane.Modules.HtmlText.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST api/<controller>
|
// POST api/<controller>
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Authorize(Policy = PolicyNames.EditModule)]
|
[Authorize(Policy = PolicyNames.EditModule)]
|
||||||
public Models.HtmlText Post([FromBody] Models.HtmlText htmlText)
|
public Models.HtmlText Post([FromBody] Models.HtmlText htmlText)
|
||||||
|
@ -104,7 +103,6 @@ namespace Oqtane.Modules.HtmlText.Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE api/<controller>/5
|
// DELETE api/<controller>/5
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
[HttpDelete("{id}/{moduleid}")]
|
[HttpDelete("{id}/{moduleid}")]
|
||||||
[Authorize(Policy = PolicyNames.EditModule)]
|
[Authorize(Policy = PolicyNames.EditModule)]
|
||||||
public void Delete(int id, int moduleId)
|
public void Delete(int id, int moduleId)
|
||||||
|
|
|
@ -58,7 +58,6 @@ namespace [Owner].[Module].Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST api/<controller>
|
// POST api/<controller>
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
[Authorize(Policy = PolicyNames.EditModule)]
|
[Authorize(Policy = PolicyNames.EditModule)]
|
||||||
public Models.[Module] Post([FromBody] Models.[Module] [Module])
|
public Models.[Module] Post([FromBody] Models.[Module] [Module])
|
||||||
|
@ -78,7 +77,6 @@ namespace [Owner].[Module].Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
// PUT api/<controller>/5
|
// PUT api/<controller>/5
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
[HttpPut("{id}")]
|
[HttpPut("{id}")]
|
||||||
[Authorize(Policy = PolicyNames.EditModule)]
|
[Authorize(Policy = PolicyNames.EditModule)]
|
||||||
public Models.[Module] Put(int id, [FromBody] Models.[Module] [Module])
|
public Models.[Module] Put(int id, [FromBody] Models.[Module] [Module])
|
||||||
|
@ -98,7 +96,6 @@ namespace [Owner].[Module].Controllers
|
||||||
}
|
}
|
||||||
|
|
||||||
// DELETE api/<controller>/5
|
// DELETE api/<controller>/5
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
[HttpDelete("{id}")]
|
[HttpDelete("{id}")]
|
||||||
[Authorize(Policy = PolicyNames.EditModule)]
|
[Authorize(Policy = PolicyNames.EditModule)]
|
||||||
public void Delete(int id)
|
public void Delete(int id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user