Ensure folder does not contain files during deletion and remove directory during deletion, fix validation issue in add page which would allow a user to create a page without selecting a layout, modify action dialog to use its own CSS class name so it can be styled independently from the Admin Modal, rollback "container" CSS class assigment on panes
This commit is contained in:
@ -214,6 +214,11 @@ namespace Oqtane.Controllers
|
||||
{
|
||||
if (_userPermissions.IsAuthorized(User, EntityNames.Folder, id, PermissionNames.Edit))
|
||||
{
|
||||
Models.Folder _folder = _folders.GetFolder(id, false);
|
||||
if (Directory.Exists(GetFolderPath(_folder)))
|
||||
{
|
||||
Directory.Delete(GetFolderPath(_folder));
|
||||
}
|
||||
_folders.DeleteFolder(id);
|
||||
_logger.Log(LogLevel.Information, this, LogFunction.Delete, "Folder Deleted {FolderId}", id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user