mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Compare commits
152 Commits
fileformat
...
revert-841
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5360b84a0f | ||
|
|
3ceda381c5 | ||
|
|
c566e12abd | ||
|
|
868ce12ad6 | ||
|
|
c62203116f | ||
|
|
df2bdb3e5c | ||
|
|
2bc7079593 | ||
|
|
f0c5b62b20 | ||
|
|
488e18d11a | ||
|
|
f581d235d2 | ||
|
|
9392718d3e | ||
|
|
60464035f7 | ||
|
|
a75203b883 | ||
|
|
b2a8e92a53 | ||
|
|
c1374f9be9 | ||
|
|
b523b342d6 | ||
|
|
21cb531949 | ||
|
|
d57af5860a | ||
|
|
dbc1e61069 | ||
|
|
55f0115459 | ||
|
|
e4b251b9ce | ||
|
|
27e6401965 | ||
|
|
5015809444 | ||
|
|
0469c3a2fd | ||
|
|
d94d50f67d | ||
|
|
bb8348626b | ||
|
|
abfe7a022e | ||
|
|
104d18aa06 | ||
|
|
a67b3cfa00 | ||
|
|
70c4541977 | ||
|
|
a0a1d1037e | ||
|
|
026f81fd16 | ||
|
|
7d2dd28404 | ||
|
|
a55cb430e2 | ||
|
|
ac60046468 | ||
|
|
e8f22a472c | ||
|
|
66480eb6b1 | ||
|
|
cf821e1fdc | ||
|
|
c98e289023 | ||
|
|
3d8bb6d460 | ||
|
|
f46be479a3 | ||
|
|
c8f5fd731e | ||
|
|
142ef2b458 | ||
|
|
b018234e39 | ||
|
|
78420a02ac | ||
|
|
83ba470cd2 | ||
|
|
bbd0d9bb16 | ||
|
|
093be0ba77 | ||
|
|
0cd7409a0f | ||
|
|
efde9e6d4d | ||
|
|
9b9ea88b09 | ||
|
|
86b2495858 | ||
|
|
3ad43bcf3f | ||
|
|
c34c00ef49 | ||
|
|
039335f79d | ||
|
|
a3e9bef3ca | ||
|
|
0279b1e79e | ||
|
|
8c5d3b6fc7 | ||
|
|
04ae8096de | ||
|
|
6c7390a073 | ||
|
|
dce04a2587 | ||
|
|
a808fdbb6b | ||
|
|
a7b0e33a43 | ||
|
|
b03d83473f | ||
|
|
eba6f118dd | ||
|
|
9ce774efa5 | ||
|
|
ec9673a1ca | ||
|
|
b6a4ef609d | ||
|
|
8ca5351872 | ||
|
|
a5b2c3d53f | ||
|
|
927e04b4ad | ||
|
|
96ffefd078 | ||
|
|
bb87e47bc3 | ||
|
|
02ff859cf4 | ||
|
|
4eba79c66e | ||
|
|
cfa335a8cf | ||
|
|
26e7a4d251 | ||
|
|
30fa9458a0 | ||
|
|
03c24d8cc7 | ||
|
|
9cafbb82c6 | ||
|
|
40e56c5dd9 | ||
|
|
367d2d7d66 | ||
|
|
f692fc36a9 | ||
|
|
759f50c5c0 | ||
|
|
91dfb8880b | ||
|
|
e19d835e5a | ||
|
|
258a490536 | ||
|
|
c7f9cddb76 | ||
|
|
9beedf8b19 | ||
|
|
a02323572d | ||
|
|
cb0011c307 | ||
|
|
ba722cf618 | ||
|
|
a53d30dd6a | ||
|
|
3c4de528c4 | ||
|
|
5c21b72793 | ||
|
|
39894eb1fb | ||
|
|
8a44db7439 | ||
|
|
b912594699 | ||
|
|
38130f427b | ||
|
|
2ee16e1cb7 | ||
|
|
f1bb89310c | ||
|
|
c77f4f3cf1 | ||
|
|
3404e0fe1b | ||
|
|
056233c9c5 | ||
|
|
5d74f4380c | ||
|
|
dd787a1d10 | ||
|
|
992e79de36 | ||
|
|
6bce539675 | ||
|
|
824e2992a6 | ||
|
|
999ecd0786 | ||
|
|
9321082d44 | ||
|
|
8826c4cdee | ||
|
|
efcf028696 | ||
|
|
c91bd63fca | ||
|
|
bb8e109582 | ||
|
|
998946ba00 | ||
|
|
1d3e9a523f | ||
|
|
f3be1504df | ||
|
|
3e77690465 | ||
|
|
ff20581899 | ||
|
|
bb6c8ed624 | ||
|
|
3c3f58fb3c | ||
|
|
3644d868ec | ||
|
|
e527272013 | ||
|
|
1d22f27bf0 | ||
|
|
c3b11fca44 | ||
|
|
61989d92d4 | ||
|
|
55485cb465 | ||
|
|
cd301e0f94 | ||
|
|
d202598953 | ||
|
|
b497f80dd7 | ||
|
|
1a1470c77a | ||
|
|
f31e6aa60d | ||
|
|
65f78c3d8d | ||
|
|
be802146bc | ||
|
|
fab98c5adb | ||
|
|
c68bb8bf77 | ||
|
|
9a308335bf | ||
|
|
d44120ff3a | ||
|
|
79aacf86b8 | ||
|
|
aa9276d9f0 | ||
|
|
cc4be02dd1 | ||
|
|
d3f4c91d40 | ||
|
|
92ca4128e3 | ||
|
|
4c78799be3 | ||
|
|
de52d82955 | ||
|
|
c1522d5b03 | ||
|
|
91f0dac7dd | ||
|
|
685f092a22 | ||
|
|
25718a3e90 | ||
|
|
6da6368bcc | ||
|
|
e3f010d62b |
@@ -191,11 +191,11 @@ Website: http://incubator.apache.org/projects/lucene.net.html
|
||||
Copyright: Copyright (c) 2009 Apache Software Foundation
|
||||
License: Apache Software Foundation License 2.0
|
||||
|
||||
MarkdownSharp
|
||||
Markdig
|
||||
-----
|
||||
Website: http://code.google.com/p/markdownsharp/
|
||||
Copyright: Copyright (c) 2009-2011 Jeff Atwood
|
||||
License: MIT
|
||||
Website: https://github.com/lunet-io/markdig
|
||||
Copyright: Copyright (c) 2018-2019, Alexandre Mutel
|
||||
License: BSD 2-Clause
|
||||
|
||||
Mono Class Library
|
||||
-----
|
||||
|
||||
29
Orchard.proj
29
Orchard.proj
@@ -14,9 +14,10 @@
|
||||
<SourceArtifactFolder>$(ArtifactsFolder)\Source</SourceArtifactFolder>
|
||||
<MsDeployArtifactFolder>$(ArtifactsFolder)\MsDeploy</MsDeployArtifactFolder>
|
||||
<GalleryArtifactFolder>$(ArtifactsFolder)\Gallery</GalleryArtifactFolder>
|
||||
<ModulesSrcFolder>$(MSBuildProjectDirectory)\src\Orchard.Web\Modules</ModulesSrcFolder>
|
||||
<OrchardCoreSrcFolder>$(MSBuildProjectDirectory)\src\Orchard.Web\Core</OrchardCoreSrcFolder>
|
||||
<ThemesSrcFolder>$(MSBuildProjectDirectory)\src\Orchard.Web\Themes</ThemesSrcFolder>
|
||||
<OrchardWebFolder>$(SrcFolder)\Orchard.Web</OrchardWebFolder>
|
||||
<ModulesSrcFolder>$(OrchardWebFolder)\Modules</ModulesSrcFolder>
|
||||
<OrchardCoreSrcFolder>$(OrchardWebFolder)\Core</OrchardCoreSrcFolder>
|
||||
<ThemesSrcFolder>$(OrchardWebFolder)\Themes</ThemesSrcFolder>
|
||||
|
||||
<CompileFolder>$(BuildFolder)\Compile</CompileFolder>
|
||||
<WebSitesFolder>$(CompileFolder)\_PublishedWebsites</WebSitesFolder>
|
||||
@@ -129,12 +130,25 @@
|
||||
<MSBuild
|
||||
Projects="$(Solution)"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder)" />
|
||||
Properties="Configuration=$(Configuration);OutputPath=$(CompileFolder);MvcBuildViews=false" />
|
||||
<!-- Compile to "regular" output folder for devs using VS locally -->
|
||||
<MSBuild
|
||||
Projects="$(Solution)"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);MvcBuildViews=$(MvcBuildViews)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="BuildViews">
|
||||
<!-- To make sure that Roslyn tools are available, even if the Compile task was not called before this. -->
|
||||
<MSBuild
|
||||
Projects="$(OrchardWebFolder)\Orchard.Web.csproj"
|
||||
Targets="CopyRoslynFilesToOutputFolder"
|
||||
Properties="Configuration=$(Configuration)" />
|
||||
<!-- The actual compilation with views also compiled. -->
|
||||
<MSBuild
|
||||
Projects="$(Solution)"
|
||||
Targets="Build"
|
||||
Properties="Configuration=$(Configuration);MvcBuildViews=true" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CompileMsBuildTasks">
|
||||
@@ -389,11 +403,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(Profiling-Web)" DestinationFolder="$(ProfilingFolder)\%(RecursiveDir)"/>
|
||||
|
||||
<XmlUpdate XmlFileName="$(ProfilingFolder)\web.config"
|
||||
XPath="/configuration/system.web/trust/@level"
|
||||
Value="Full" />
|
||||
|
||||
</Target>
|
||||
|
||||
<Target Name="Profiling-Setup">
|
||||
@@ -401,7 +410,7 @@
|
||||
<Output TaskParameter="Lines" ItemName="ProfilingSetupCommands"/>
|
||||
</ReadLinesFromFile>
|
||||
|
||||
<Exec Command="$(ProfilingFolder)\bin\Orchard.exe %(ProfilingSetupCommands.Identity)" WorkingDirectory="$(ProfilingFolder)"/>
|
||||
<Exec Command=""$(ProfilingFolder)\bin\Orchard.exe" %(ProfilingSetupCommands.Identity)" WorkingDirectory="$(ProfilingFolder)"/>
|
||||
</Target>
|
||||
|
||||
<!-- Gallery Packaging -->
|
||||
|
||||
32
README.md
32
README.md
@@ -10,47 +10,43 @@ You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Az
|
||||
|
||||
## About The Orchard Project
|
||||
|
||||
#### Please visit our website at http://orchardproject.net for the most current information about this project.
|
||||
#### Please visit our website at https://orchardproject.net for the most current information about this project.
|
||||
|
||||
Orchard is a free, open source, community-focused **Content Management System** built on the ASP.NET MVC platform.
|
||||
|
||||
Orchard is built on a modern architecture that puts extensibility up-front, as its number one concern. All components in Orchard can be replaced or extended. Content is built from easily composable building blocks. Modules extend the system in a very decoupled fashion, where a commenting module for example can as easily apply to pages, blog posts, photos or products. A rich UI composition system completes the picture and ensures that you can get the exact presentation that you need for your content.
|
||||
|
||||
Orchard is delivered under the [.NET Foundation](http://www.dotnetfoundation.org/orchard). It is licensed under a [New BSD license](http://www.opensource.org/licenses/bsd-license.php), which is approved by the OSI.
|
||||
Orchard is delivered under the [.NET Foundation](https://www.dotnetfoundation.org/projects?searchquery=Orchard&type=project). It is licensed under a [New BSD license](https://www.opensource.org/licenses/bsd-license.php), which is approved by the OSI.
|
||||
|
||||
Our mission is to empower our users and foster a dedicated and diverse community that builds the CMS that we all want to use.
|
||||
|
||||
## Project Status
|
||||
|
||||
Orchard is currently in version **[1.10.2](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.2)**: It contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*).
|
||||
Orchard is currently in version **[1.10.3](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.3)**: It contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*).
|
||||
|
||||
We invite participation by the developer community in shaping the project’s direction, so that we can publicly validate our designs and development approach.
|
||||
All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and it's easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard) as well. We encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project.
|
||||
All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and we encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project.
|
||||
|
||||
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
|
||||
* [Feature roadmap](http://docs.orchardproject.net/Documentation/feature-roadmap)
|
||||
* [Docs and designs/specs](http://www.orchardproject.net/docs)
|
||||
* [About us](http://www.orchardproject.net/about)
|
||||
* [Contact us](mailto:ofeedbk@microsoft.com)
|
||||
* [Feature roadmap](https://docs.orchardproject.net/en/latest/Documentation/Feature-roadmap/)
|
||||
* [Docs and designs/specs](https://docs.orchardproject.net)
|
||||
|
||||
## How To Get Involved
|
||||
|
||||
We hope that by engaging with the community we will continue to shape Orchard into a valuable set of tools and applications. The Orchard team is committed to open community participation and accepts code contributions. We encourage community participation at all levels from general project feedback to bug fixes and patches.
|
||||
|
||||
There are many ways you can [contribute to Orchard](http://orchardproject.net/contribution):
|
||||
There are many ways you can contribute to Orchard:
|
||||
|
||||
* [Check out the code](https://github.com/OrchardCMS/Orchard)
|
||||
* [Write documentation](https://github.com/OrchardCMS/OrchardDoc)
|
||||
* [Find and file a bug](https://github.com/OrchardCMS/Orchard/issues)
|
||||
* [Propose a feature idea](http://orchard.uservoice.com)
|
||||
* [Ask and answer questions in our forums](http://www.orchardproject.net/discussions) and [on Stack Overflow](http://stackoverflow.com/questions/tagged/orchardcms)
|
||||
* [Propose a feature idea](https://github.com/OrchardCMS/Orchard/issues/new)
|
||||
* [Ask and answer questions on Stack Overflow](https://stackoverflow.com/questions/tagged/orchardcms)
|
||||
* [Participate in our gitter.im chatroom](https://gitter.im/OrchardCMS/Orchard)
|
||||
* [Participate in forum discussions](http://orchard.codeplex.com/discussions)
|
||||
* [Submit a pull request](http://docs.orchardproject.net/Documentation/Contributing-patches)
|
||||
* [Translate Orchard](http://orchardproject.net/localization)
|
||||
* [Contribute modules and themes to our gallery](http://gallery.orchardproject.net/)
|
||||
* [Send us feedback](mailto:ofeedbk@microsoft.com)
|
||||
* [Submit a pull request](https://docs.orchardproject.net/en/latest/Documentation/Contributing-patches/)
|
||||
* [Translate Orchard](https://crowdin.com/project/orchard-cms)
|
||||
* [Contribute modules and themes to our gallery](https://gallery.orchardproject.net/)
|
||||
|
||||
## The Future Of Orchard CMS: Orchard 2
|
||||
## The Future Of Orchard CMS: Orchard Core
|
||||
|
||||
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard 2 is the next generation of Orchard releases that is based on [ASP.NET Core](http://www.asp.net/core). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/Orchard2). Orchard 2 (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions of Orchard.
|
||||
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard Core is the next generation of Orchard releases that is based on [ASP.NET Core](https://www.asp.net/core). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/OrchardCore). Orchard Core (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions (1.x) of Orchard.
|
||||
|
||||
11
src/.editorconfig
Normal file
11
src/.editorconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = crlf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.cs]
|
||||
csharp_new_line_before_open_brace = none
|
||||
dotnet_sort_system_directives_first = true
|
||||
6
src/NuGet.config
Normal file
6
src/NuGet.config
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<config>
|
||||
<add key="repositoryPath" value="./packages" />
|
||||
</config>
|
||||
</configuration>
|
||||
@@ -41,6 +41,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -52,6 +53,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -52,6 +53,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
@@ -1 +1 @@
|
||||
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SQLServer /DatabaseConnectionString:"Data Source=.;Initial Catalog=Orchard;Integrated Security=True" /EnabledFeatures:Profiling,Orchard.Framework,Common,Containers,Contents,Dashboard,Feeds,Navigation,Scheduling,Settings,Shapes,Title,PackagingServices,Gallery,Orchard.PublishLater,Orchard.Blogs,Orchard.Comments,Orchard.ContentTypes,Orchard.Resources,Orchard.Lists,Orchard.MediaLibrary,Orchard.ContentPicker,Orchard.MediaPicker,Orchard.Modules,Orchard.Packaging,Orchard.Pages,Orchard.Recipes,Orchard.Roles,Orchard.Tags,Orchard.Themes,Orchard.Users,Orchard.Scripting,Orchard.Scripting.Lightweight,Orchard.Widgets,TinyMce,TheThemeMachine,Orchard.Tokens,Orchard.Alias,Orchard.Autoroute
|
||||
setup /SiteName:Profiling /AdminUsername:admin /AdminPassword:profiling-secret /DatabaseProvider:SQLServer /DatabaseConnectionString:"Data Source=.;Initial Catalog=Orchard;Integrated Security=True" /EnabledFeatures:Profiling,Orchard.Framework,Common,Containers,Contents,Dashboard,Feeds,Navigation,Scheduling,Settings,Shapes,Title,PackagingServices,Gallery,Orchard.PublishLater,Orchard.Blogs,Orchard.Comments,Orchard.ContentTypes,Orchard.Resources,Orchard.Lists,Orchard.MediaLibrary,Orchard.ContentPicker,Orchard.MediaPicker,Orchard.Modules,Orchard.Packaging,Orchard.Pages,Orchard.Recipes,Orchard.Roles,Orchard.Tags,Orchard.Themes,Orchard.Users,Orchard.Scripting,Orchard.Scripting.Lightweight,Orchard.Widgets,TinyMce,TheThemeMachine,Orchard.Tokens,Orchard.Alias,Orchard.Autoroute
|
||||
@@ -4,8 +4,6 @@ using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Core.Contents;
|
||||
using Orchard.Data;
|
||||
using Orchard.Roles.Models;
|
||||
using Orchard.Roles.Services;
|
||||
using Orchard.Security;
|
||||
using Orchard.Security.Permissions;
|
||||
using Orchard.Specs.Hosting.Orchard.Web;
|
||||
|
||||
@@ -11,6 +11,22 @@ using TechTalk.SpecFlow;
|
||||
namespace Orchard.Specs.Bindings {
|
||||
[Binding]
|
||||
public class OrchardSiteFactory : BindingBase {
|
||||
[Given(@"I have a clean site with standard extensions")]
|
||||
public void GivenIHaveACleanSiteWithStandardExtensions() {
|
||||
GivenIHaveACleanSiteWithStandardExtensions("/");
|
||||
}
|
||||
|
||||
[Given(@"I have a clean site with standard extensions at ""(.*)\""")]
|
||||
public void GivenIHaveACleanSiteWithStandardExtensions(string virtualDirectory) {
|
||||
Binding<WebAppHosting>().GivenIHaveACleanSiteWith(
|
||||
virtualDirectory,
|
||||
// This is the list of extensions which will be copied over into the temporary Orchard folder.
|
||||
TableData(
|
||||
new { extension = "Module", names = "Lucene, Markdown, Orchard.Alias, Orchard.AntiSpam, Orchard.ArchiveLater, Orchard.Autoroute, Orchard.Azure, Orchard.Blogs, Orchard.Caching, Orchard.CodeGeneration, Orchard.Comments, Orchard.ContentPermissions, Orchard.ContentPicker, Orchard.ContentTypes, Orchard.DesignerTools, Orchard.Email, Orchard.Fields, Orchard.Forms, Orchard.ImageEditor, Orchard.ImportExport, Orchard.Indexing, Orchard.JobsQueue, Orchard.Resources, Orchard.Layouts, Orchard.Lists, Orchard.Localization, Orchard.MediaLibrary, Orchard.MediaProcessing, Orchard.Migrations, Orchard.Modules, Orchard.MultiTenancy, Orchard.OutputCache, Orchard.Packaging, Orchard.Pages, Orchard.Projections, Orchard.PublishLater, Orchard.Recipes, Orchard.Roles, Orchard.Scripting, Orchard.Scripting.CSharp, Orchard.Scripting.Dlr, Orchard.Search, Orchard.SecureSocketsLayer, Orchard.Setup, Orchard.Tags, Orchard.Taxonomies, Orchard.Templates, Orchard.Themes, Orchard.Tokens, Orchard.Users, Orchard.Warmup, Orchard.Widgets, Orchard.Workflows, Orchard.Conditions, SysCache, TinyMce, Upgrade" },
|
||||
new { extension = "Core", names = "Common, Containers, Contents, Dashboard, Feeds, Navigation, Scheduling, Settings, Shapes, Title, XmlRpc" },
|
||||
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
||||
}
|
||||
|
||||
[Given(@"I have installed Orchard")]
|
||||
public void GivenIHaveInstalledOrchard() {
|
||||
GivenIHaveInstalledOrchard("/");
|
||||
@@ -20,13 +36,7 @@ namespace Orchard.Specs.Bindings {
|
||||
public void GivenIHaveInstalledOrchard(string virtualDirectory) {
|
||||
var webApp = Binding<WebAppHosting>();
|
||||
|
||||
// this is the list of module which will be copied over into the temporary Orchard folder
|
||||
webApp.GivenIHaveACleanSiteWith(
|
||||
virtualDirectory,
|
||||
TableData(
|
||||
new { extension = "Module", names = "Lucene, Markdown, Orchard.Alias, Orchard.AntiSpam, Orchard.ArchiveLater, Orchard.Autoroute, Orchard.Azure, Orchard.Blogs, Orchard.Caching, Orchard.CodeGeneration, Orchard.Comments, Orchard.ContentPermissions, Orchard.ContentPicker, Orchard.ContentTypes, Orchard.DesignerTools, Orchard.Email, Orchard.Fields, Orchard.Forms, Orchard.ImageEditor, Orchard.ImportExport, Orchard.Indexing, Orchard.JobsQueue, Orchard.Resources, Orchard.Layouts, Orchard.Lists, Orchard.Localization, Orchard.MediaLibrary, Orchard.MediaProcessing, Orchard.Migrations, Orchard.Modules, Orchard.MultiTenancy, Orchard.OutputCache, Orchard.Packaging, Orchard.Pages, Orchard.Projections, Orchard.PublishLater, Orchard.Recipes, Orchard.Roles, Orchard.Scripting, Orchard.Scripting.CSharp, Orchard.Scripting.Dlr, Orchard.Search, Orchard.SecureSocketsLayer, Orchard.Setup, Orchard.Tags, Orchard.Taxonomies, Orchard.Templates, Orchard.Themes, Orchard.Tokens, Orchard.Users, Orchard.Warmup, Orchard.Widgets, Orchard.Workflows, Orchard.Conditions, SysCache, TinyMce, Upgrade" },
|
||||
new { extension = "Core", names = "Common, Containers, Contents, Dashboard, Feeds, Navigation, Scheduling, Settings, Shapes, Title, XmlRpc" },
|
||||
new { extension = "Theme", names = "SafeMode, TheAdmin, TheThemeMachine" }));
|
||||
GivenIHaveACleanSiteWithStandardExtensions(virtualDirectory);
|
||||
|
||||
webApp.WhenIGoTo("Setup");
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Core.Contents;
|
||||
using Orchard.Data;
|
||||
using Orchard.Roles.Models;
|
||||
using Orchard.Roles.Services;
|
||||
using Orchard.Security;
|
||||
using Orchard.Security.Permissions;
|
||||
using Orchard.Specs.Hosting.Orchard.Web;
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||
<!-- Set Value="true" to disable compiled dependencies files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
<compilation targetFramework="4.5">
|
||||
<compilation targetFramework="4.5.2">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="Orchard.Framework" />
|
||||
<add assembly="Orchard.Core" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<pages>
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc"/>
|
||||
<add namespace="System.Web.Mvc.Ajax"/>
|
||||
<add namespace="System.Web.Mvc.Html"/>
|
||||
<add namespace="System.Web.Routing"/>
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web>
|
||||
<system.web.extensions/>
|
||||
</configuration>
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
<!--
|
||||
Enabling request validation in view pages would cause validation to occur
|
||||
@@ -13,5 +23,17 @@
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" namespace="System.Web.Mvc" tagPrefix="mvc" />
|
||||
</controls>
|
||||
</pages>
|
||||
<compilation targetFramework="4.5.2">
|
||||
<assemblies>
|
||||
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="Orchard.Framework" />
|
||||
<add assembly="Orchard.Core" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
</configuration>
|
||||
|
||||
@@ -1,28 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<!--
|
||||
Note: As an alternative to hand editing this file you can use the
|
||||
web admin tool to configure settings for your application. Use
|
||||
the Website->Asp.Net Configuration option in Visual Studio.
|
||||
A full list of settings and comments can be found in
|
||||
machine.config.comments usually located in
|
||||
\Windows\Microsoft.Net\Framework\v2.x\Config
|
||||
-->
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
|
||||
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false" />
|
||||
</configSections>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="webpages:Version" value="3.0.0"/>
|
||||
<add key="log4net.Config" value="Config\log4net.config" />
|
||||
<add key="webpages:Version" value="3.0.3" />
|
||||
<add key="owin:AutomaticAppStartup" value="false" />
|
||||
</appSettings>
|
||||
|
||||
@@ -30,26 +19,29 @@ machine.config.comments usually located in
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Collections.Generic" />
|
||||
<add namespace="System.Linq" />
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
<add namespace="Orchard.Mvc.Html" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<!--
|
||||
Set default transaction timeout to 30 minutes so that interactive debugging
|
||||
is easier (default timeout is less than one minute)
|
||||
-->
|
||||
<system.transactions>
|
||||
<defaultSettings timeout="00:30:00"/>
|
||||
<defaultSettings timeout="00:30:00" />
|
||||
</system.transactions>
|
||||
|
||||
|
||||
<!-- Registering Roslyn as a compiler for Dynamic Compilation. -->
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
|
||||
<system.web>
|
||||
<httpRuntime targetFramework="4.5.2" requestValidationMode="2.0" />
|
||||
<!--
|
||||
@@ -60,76 +52,65 @@ machine.config.comments usually located in
|
||||
-->
|
||||
<compilation debug="false" targetFramework="4.5.2" batch="true" numRecompilesBeforeAppRestart="250" optimizeCompilations="true">
|
||||
<buildProviders>
|
||||
<add extension=".csproj" type="Orchard.Environment.Extensions.Compilers.CSharpExtensionBuildProviderShim"/>
|
||||
<add extension=".csproj" type="Orchard.Environment.Extensions.Compilers.CSharpExtensionBuildProviderShim" />
|
||||
</buildProviders>
|
||||
<assemblies>
|
||||
<add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
|
||||
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="Microsoft.Owin.Host.SystemWeb, Version=3.0.0.0" />
|
||||
<remove assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<remove assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<remove assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<remove assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<remove assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<remove assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<remove assembly="System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
|
||||
<remove assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<remove assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<remove assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<remove assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<remove assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<remove assembly="System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<remove assembly="System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<remove assembly="System.WorkflowServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<remove assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<remove assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
|
||||
<remove assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
|
||||
<add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<remove assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<remove assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<remove assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<remove assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<remove assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<remove assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<remove assembly="System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<remove assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<remove assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<remove assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<remove assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<remove assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<remove assembly="System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<remove assembly="System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<remove assembly="System.WorkflowServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<remove assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<remove assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<!--
|
||||
The <authentication> section enables configuration
|
||||
of the security authentication mode used by
|
||||
ASP.NET to identify an incoming user.
|
||||
-->
|
||||
<authentication mode="Forms">
|
||||
<forms loginUrl="~/Users/Account/AccessDenied" timeout="2880"/>
|
||||
<forms loginUrl="~/Users/Account/AccessDenied" timeout="2880" />
|
||||
</authentication>
|
||||
<!--
|
||||
The <customErrors> section enables configuration
|
||||
of what to do if/when an unhandled error occurs
|
||||
during the execution of a request. Specifically,
|
||||
it enables developers to configure html error pages
|
||||
to be displayed in place of a error stack trace.
|
||||
-->
|
||||
<customErrors mode="RemoteOnly" />
|
||||
<pages>
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc"/>
|
||||
<add namespace="System.Web.Mvc.Ajax"/>
|
||||
<add namespace="System.Web.Mvc.Html"/>
|
||||
<add namespace="System.Web.Routing"/>
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
<add namespace="System.Collections.Generic" />
|
||||
<add namespace="System.Linq" />
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="System.Web.WebPages" />
|
||||
<add namespace="Orchard.Mvc.Html" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
||||
<!--
|
||||
The system.webServer section is required for running ASP.NET AJAX under Internet
|
||||
Information Services 7.0. It is not necessary for previous version of IIS.
|
||||
-->
|
||||
|
||||
<system.webServer>
|
||||
<!-- prevent iis from only allowing integrated mode configuration -->
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules runAllManagedModulesForAllRequests="false">
|
||||
<remove name="OutputCache" />
|
||||
<remove name="WarmupHttpModule" />
|
||||
<add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.8.1, Culture=neutral"/>
|
||||
<add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.10, Culture=neutral" />
|
||||
</modules>
|
||||
<handlers accessPolicy="Script">
|
||||
<!-- clear all handlers, prevents executing code file extensions, prevents returning any file contents -->
|
||||
@@ -144,89 +125,113 @@ machine.config.comments usually located in
|
||||
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
|
||||
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
|
||||
</handlers>
|
||||
<!-- Prevent IIS 7.0 from returning a custom 404/500 error page of its own -->
|
||||
<!-- Prevent IIS 7.0 from returning a custom 404/500 error page of its own. -->
|
||||
<httpErrors existingResponse="PassThrough" />
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<!-- Accept file uploads up to 64 MB. -->
|
||||
<requestLimits maxAllowedContentLength="67108864" />
|
||||
</requestFiltering>
|
||||
</security>
|
||||
<staticContent>
|
||||
<remove fileExtension=".mp3" />
|
||||
<mimeMap fileExtension=".mp3" mimeType="audio/mpeg" />
|
||||
<remove fileExtension=".mp4" />
|
||||
<mimeMap fileExtension=".mp4" mimeType="video/mp4" />
|
||||
<remove fileExtension=".pdf" />
|
||||
<mimeMap fileExtension=".pdf" mimeType="application/pdf" />
|
||||
<remove fileExtension=".svg" />
|
||||
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
|
||||
<remove fileExtension=".woff" />
|
||||
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
|
||||
<remove fileExtension=".woff2" />
|
||||
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
|
||||
|
||||
<runtime>
|
||||
<gcServer enabled="true"/>
|
||||
<gcServer enabled="true" />
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<probing privatePath="App_Data/Dependencies"/>
|
||||
<probing privatePath="App_Data/Dependencies" />
|
||||
<dependentAssembly>
|
||||
<!-- 1.0.1.0 by NHibernate.Linq, Version=0.0.0.0 -->
|
||||
<assemblyIdentity name="Iesi.Collections" publicKeyToken="AA95F207798DFDB4" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
<assemblyIdentity name="Iesi.Collections" publicKeyToken="AA95F207798DFDB4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
|
||||
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
|
||||
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
|
||||
<assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
|
||||
<assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
|
||||
<assemblyIdentity name="System.Web.WebPages.Deployment" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>
|
||||
<assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
|
||||
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"/>
|
||||
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<!-- 3.3.1.4000 by NHibernate.Linq, Version=0.0.0.0 -->
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000"/>
|
||||
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.4000" newVersion="4.0.0.4000" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0"/>
|
||||
<assemblyIdentity name="Autofac" publicKeyToken="17863af14b0044da" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.5.0.0" newVersion="3.5.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0"/>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.WindowsAzure.Storage" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
|
||||
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31BF3856AD364E35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0"/>
|
||||
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31BF3856AD364E35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<!-- 2.0.0.0 by System.Data.SqlServerCe, Version=4.0.0.0 -->
|
||||
<assemblyIdentity name="System.Transactions" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
<assemblyIdentity name="System.Transactions" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<!-- 2.0.0.0 by System.Data.SqlServerCe, Version=4.0.0.0 -->
|
||||
<assemblyIdentity name="System.Data" publicKeyToken="31bf3856ad364e35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0"/>
|
||||
<assemblyIdentity name="System.Data" publicKeyToken="31bf3856ad364e35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Iesi.Collections" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -174,16 +174,16 @@ machine.config.comments usually located in
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.0.2.0" newVersion="5.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
|
||||
<assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31BF3856AD364E35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
|
||||
<assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31BF3856AD364E35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31BF3856AD364E35" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.6.3.0" newVersion="5.6.3.0"/>
|
||||
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31BF3856AD364E35" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-5.8.4.0" newVersion="5.8.4.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable source files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
|
||||
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
|
||||
<Property Name="Disabled" Value="true"/>
|
||||
</Properties>
|
||||
@@ -63,7 +62,7 @@
|
||||
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||
<!-- Set Value="true" to disable compiled dependencies files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -96,6 +95,38 @@
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Services.ClientHostAddressAccessor">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to read the client host address from the specified HTTP header. -->
|
||||
<Property Name="EnableClientHostAddressHeader" Value="false"/>
|
||||
|
||||
<!-- Set Value to the HTTP header name from which to read the client host address. Only used when EnableClientHostAddressHeader="true".
|
||||
If the specified header was not found, the system will fall back to the client host address as provided by the Request object.-->
|
||||
<Property Name="ClientHostAddressHeaderName" Value="X-Forwarded-For"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Setup.Controllers.SetupController">
|
||||
<Properties>
|
||||
<!-- Sets the request timeout to a configurable amount of seconds to give enough time to execute setup recipes. -->
|
||||
<Property Name="RecipeExecutionTimeout" Value="600"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.ImportExport.Providers.ImportActions.ExecuteRecipeAction">
|
||||
<Properties>
|
||||
<!-- Sets the request timeout to a configurable amount of seconds to give enough time to execute imported recipes. -->
|
||||
<Property Name="RecipeExecutionTimeout" Value="600"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.DefaultOrchardHost">
|
||||
<Properties>
|
||||
<!-- The number of retries when a tenant can't be loaded -->
|
||||
<Property Name="Retries" Value="1"/>
|
||||
<Property Name="DelayRetries" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
</Components>
|
||||
</HostComponents>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<HostComponents>
|
||||
<Components>
|
||||
|
||||
@@ -44,18 +44,20 @@
|
||||
<!-- Set Value="true" to completely disable the Dynamic Extension Loader -->
|
||||
<Property Name="Disabled" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.PrecompiledExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable pre-compiled files monitoring (~/Modules/**/bin/*.dll) -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
<!-- Set Value="true" to completely disable the Precompiled Extension Loader -->
|
||||
<Property Name="Disabled" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
|
||||
<Component Type="Orchard.Environment.Extensions.Loaders.ReferencedExtensionLoader">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to completely disable the Referenced Extension Loader -->
|
||||
<Property Name="Disabled" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -69,7 +71,7 @@
|
||||
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||
<!-- Set Value="true" to disable compiled dependencies files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -102,6 +104,38 @@
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Services.ClientHostAddressAccessor">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to read the client host address from the specified HTTP header. -->
|
||||
<Property Name="EnableClientHostAddressHeader" Value="false"/>
|
||||
|
||||
<!-- Set Value to the HTTP header name from which to read the client host address. Only used when EnableClientHostAddressHeader="true".
|
||||
If the specified header was not found, the system will fall back to the client host address as provided by the Request object.-->
|
||||
<Property Name="ClientHostAddressHeaderName" Value="X-Forwarded-For"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Setup.Controllers.SetupController">
|
||||
<Properties>
|
||||
<!-- Sets the request timeout to a configurable amount of seconds to give enough time to execute setup recipes. -->
|
||||
<Property Name="RecipeExecutionTimeout" Value="600"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.ImportExport.Providers.ImportActions.ExecuteRecipeAction">
|
||||
<Properties>
|
||||
<!-- Sets the request timeout to a configurable amount of seconds to give enough time to execute imported recipes. -->
|
||||
<Property Name="RecipeExecutionTimeout" Value="600"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
<Component Type="Orchard.Environment.DefaultOrchardHost">
|
||||
<Properties>
|
||||
<!-- The number of retries when a tenant can't be loaded -->
|
||||
<Property Name="Retries" Value="1"/>
|
||||
<Property Name="DelayRetries" Value="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
</Components>
|
||||
</HostComponents>
|
||||
|
||||
@@ -96,11 +96,11 @@ namespace Orchard.Specs.Hosting {
|
||||
.DeepCopy("*.*", _tempSite.Combine("bin").Combine("amd64"));
|
||||
}
|
||||
|
||||
//Log("Copy roslyn binaries");
|
||||
//if (_orchardWebPath.Combine("bin").Combine("roslyn").IsDirectory) {
|
||||
// _orchardWebPath.Combine("bin").Combine("roslyn")
|
||||
// .DeepCopy("*.*", _tempSite.Combine("bin").Combine("roslyn"));
|
||||
//}
|
||||
Log("Copy Roslyn binaries");
|
||||
if (_orchardWebPath.Combine("bin").Combine("roslyn").IsDirectory) {
|
||||
_orchardWebPath.Combine("bin").Combine("roslyn")
|
||||
.DeepCopy("*.*", _tempSite.Combine("bin").Combine("roslyn"));
|
||||
}
|
||||
|
||||
// Copy binaries of this project, so that remote execution of lambda
|
||||
// can be achieved through serialization to the ASP.NET appdomain
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -52,6 +53,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -481,10 +483,6 @@
|
||||
<Project>{8C7FCBC2-E6E1-405E-BFB5-D8D9E67A09C4}</Project>
|
||||
<Name>Orchard.Setup</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Users\Orchard.Users.csproj">
|
||||
<Project>{79AED36E-ABD0-4747-93D3-8722B042454B}</Project>
|
||||
<Name>Orchard.Users</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Orchard.Web.csproj">
|
||||
<Project>{50B779EA-EC00-4699-84C0-03B395C365D2}</Project>
|
||||
<Name>Orchard.Web</Name>
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
@@ -1,50 +1,29 @@
|
||||
Feature: Setup
|
||||
In order to install orchard
|
||||
As a new user
|
||||
I want to setup a new site from the default screen
|
||||
I want to access the Setup screen from the default screen and the Setup folder, then the Setup should be successful if required fields are filled in
|
||||
|
||||
Scenario: RootAndSetupFolderShowsSetupScreenAndFormValuesAreValidated
|
||||
Given I have a clean site with standard extensions
|
||||
|
||||
Scenario: Root request shows setup form
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.Resources, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp, Orchard.Conditions |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode |
|
||||
When I go to "/"
|
||||
Then I should see "Welcome to Orchard"
|
||||
And I should see "Finish Setup"
|
||||
And the status should be 200 "OK"
|
||||
|
||||
Scenario: Setup folder also shows setup form
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.Resources, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp, Orchard.Conditions |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode |
|
||||
When I go to "/Setup"
|
||||
Then I should see "Welcome to Orchard"
|
||||
And I should see "Finish Setup"
|
||||
And the status should be 200 "OK"
|
||||
|
||||
Scenario: Some of the initial form values are required
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.Resources, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp, Orchard.Conditions |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode |
|
||||
When I go to "/Setup"
|
||||
And I hit "Finish Setup"
|
||||
Then I should see "Site name is required."
|
||||
And I should see "Password is required."
|
||||
And I should see "Password confirmation is required."
|
||||
|
||||
Scenario: Calling setup on a brand new install
|
||||
Given I have a clean site with
|
||||
| extension | names |
|
||||
| Module | Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.Resources, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp, Orchard.Conditions |
|
||||
| Core | Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings, Shapes, XmlRpc, Title |
|
||||
| Theme | SafeMode, TheAdmin, TheThemeMachine |
|
||||
And I am on "/Setup"
|
||||
When I fill in
|
||||
When I go to "/Setup"
|
||||
And I fill in
|
||||
| name | value |
|
||||
| SiteName | My Site |
|
||||
| AdminPassword | 6655321 |
|
||||
@@ -52,4 +31,4 @@ Scenario: Calling setup on a brand new install
|
||||
And I hit "Finish Setup"
|
||||
And I go to "/"
|
||||
Then I should see "My Site"
|
||||
And I should see "Welcome, <strong><a href="/Users/Account/ChangePassword">admin</a></strong>!"
|
||||
And I should see "Welcome, <strong><a href="/Users/Account/ChangePassword">admin</a></strong>!"
|
||||
184
src/Orchard.Specs/Setup.feature.cs
generated
184
src/Orchard.Specs/Setup.feature.cs
generated
@@ -32,8 +32,9 @@ namespace Orchard.Specs
|
||||
public virtual void FeatureSetup()
|
||||
{
|
||||
testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
|
||||
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Setup", " In order to install orchard\r\n As a new user\r\n I want to setup a new site from" +
|
||||
" the default screen", ProgrammingLanguage.CSharp, ((string[])(null)));
|
||||
TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Setup", " In order to install orchard\r\n As a new user\r\n I want to access the Setup scre" +
|
||||
"en from the default screen and the Setup folder, then the Setup should be succes" +
|
||||
"sful if required fields are filled in", ProgrammingLanguage.CSharp, ((string[])(null)));
|
||||
testRunner.OnFeatureStart(featureInfo);
|
||||
}
|
||||
|
||||
@@ -66,159 +67,64 @@ namespace Orchard.Specs
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Root request shows setup form")]
|
||||
public virtual void RootRequestShowsSetupForm()
|
||||
[NUnit.Framework.DescriptionAttribute("RootAndSetupFolderShowsSetupScreenAndFormValuesAreValidated")]
|
||||
public virtual void RootAndSetupFolderShowsSetupScreenAndFormValuesAreValidated()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Root request shows setup form", ((string[])(null)));
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("RootAndSetupFolderShowsSetupScreenAndFormValuesAreValidated", ((string[])(null)));
|
||||
#line 6
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line 7
|
||||
testRunner.Given("I have a clean site with standard extensions", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
|
||||
#line 9
|
||||
testRunner.When("I go to \"/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 10
|
||||
testRunner.Then("I should see \"Welcome to Orchard\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 11
|
||||
testRunner.And("I should see \"Finish Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 12
|
||||
testRunner.And("the status should be 200 \"OK\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 14
|
||||
testRunner.When("I go to \"/Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 15
|
||||
testRunner.Then("I should see \"Welcome to Orchard\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 16
|
||||
testRunner.And("I should see \"Finish Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 17
|
||||
testRunner.And("the status should be 200 \"OK\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 19
|
||||
testRunner.When("I go to \"/Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 20
|
||||
testRunner.And("I hit \"Finish Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 21
|
||||
testRunner.Then("I should see \"Site name is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 22
|
||||
testRunner.And("I should see \"Password is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 23
|
||||
testRunner.And("I should see \"Password confirmation is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 25
|
||||
testRunner.When("I go to \"/Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table1 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"extension",
|
||||
"names"});
|
||||
table1.AddRow(new string[] {
|
||||
"Module",
|
||||
@"Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.Resources, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp, Orchard.Conditions"});
|
||||
table1.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table1.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode"});
|
||||
#line 7
|
||||
testRunner.Given("I have a clean site with", ((string)(null)), table1, "Given ");
|
||||
#line 12
|
||||
testRunner.When("I go to \"/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 13
|
||||
testRunner.Then("I should see \"Welcome to Orchard\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 14
|
||||
testRunner.And("I should see \"Finish Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 15
|
||||
testRunner.And("the status should be 200 \"OK\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Setup folder also shows setup form")]
|
||||
public virtual void SetupFolderAlsoShowsSetupForm()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Setup folder also shows setup form", ((string[])(null)));
|
||||
#line 17
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table2 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"extension",
|
||||
"names"});
|
||||
table2.AddRow(new string[] {
|
||||
"Module",
|
||||
@"Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.Resources, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp, Orchard.Conditions"});
|
||||
table2.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table2.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode"});
|
||||
#line 18
|
||||
testRunner.Given("I have a clean site with", ((string)(null)), table2, "Given ");
|
||||
#line 23
|
||||
testRunner.When("I go to \"/Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 24
|
||||
testRunner.Then("I should see \"Welcome to Orchard\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 25
|
||||
testRunner.And("I should see \"Finish Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 26
|
||||
testRunner.And("the status should be 200 \"OK\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Some of the initial form values are required")]
|
||||
public virtual void SomeOfTheInitialFormValuesAreRequired()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Some of the initial form values are required", ((string[])(null)));
|
||||
#line 28
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table3 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"extension",
|
||||
"names"});
|
||||
table3.AddRow(new string[] {
|
||||
"Module",
|
||||
@"Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.Resources, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp, Orchard.Conditions"});
|
||||
table3.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table3.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode"});
|
||||
#line 29
|
||||
testRunner.Given("I have a clean site with", ((string)(null)), table3, "Given ");
|
||||
#line 34
|
||||
testRunner.When("I go to \"/Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
|
||||
#line 35
|
||||
testRunner.And("I hit \"Finish Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 36
|
||||
testRunner.Then("I should see \"Site name is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 37
|
||||
testRunner.And("I should see \"Password is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 38
|
||||
testRunner.And("I should see \"Password confirmation is required.\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
this.ScenarioCleanup();
|
||||
}
|
||||
|
||||
[NUnit.Framework.TestAttribute()]
|
||||
[NUnit.Framework.DescriptionAttribute("Calling setup on a brand new install")]
|
||||
public virtual void CallingSetupOnABrandNewInstall()
|
||||
{
|
||||
TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Calling setup on a brand new install", ((string[])(null)));
|
||||
#line 40
|
||||
this.ScenarioSetup(scenarioInfo);
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table4 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"extension",
|
||||
"names"});
|
||||
table4.AddRow(new string[] {
|
||||
"Module",
|
||||
@"Orchard.Setup, Orchard.Layouts, Orchard.Pages, Orchard.ContentPicker, Orchard.Blogs, Orchard.MediaLibrary, Orchard.Modules, Orchard.Packaging, Orchard.PublishLater, Orchard.Themes, Orchard.Scripting, Orchard.Widgets, Orchard.Users, Orchard.ContentTypes, Orchard.Roles, Orchard.Comments, Orchard.Resources, Orchard.Tags, TinyMce, Orchard.Recipes, Orchard.Warmup, Orchard.Alias, Orchard.Forms, Orchard.Tokens, Orchard.Autoroute, Orchard.Projections, Orchard.Fields, Orchard.MediaProcessing, Orchard.OutputCache, Orchard.Taxonomies, Orchard.Workflows, Orchard.Scripting.CSharp, Orchard.Conditions"});
|
||||
table4.AddRow(new string[] {
|
||||
"Core",
|
||||
"Common, Containers, Dashboard, Feeds, Navigation, Contents, Scheduling, Settings," +
|
||||
" Shapes, XmlRpc, Title"});
|
||||
table4.AddRow(new string[] {
|
||||
"Theme",
|
||||
"SafeMode, TheAdmin, TheThemeMachine"});
|
||||
#line 41
|
||||
testRunner.Given("I have a clean site with", ((string)(null)), table4, "Given ");
|
||||
#line 46
|
||||
testRunner.And("I am on \"/Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
TechTalk.SpecFlow.Table table5 = new TechTalk.SpecFlow.Table(new string[] {
|
||||
"name",
|
||||
"value"});
|
||||
table5.AddRow(new string[] {
|
||||
table1.AddRow(new string[] {
|
||||
"SiteName",
|
||||
"My Site"});
|
||||
table5.AddRow(new string[] {
|
||||
table1.AddRow(new string[] {
|
||||
"AdminPassword",
|
||||
"6655321"});
|
||||
table5.AddRow(new string[] {
|
||||
table1.AddRow(new string[] {
|
||||
"ConfirmPassword",
|
||||
"6655321"});
|
||||
#line 47
|
||||
testRunner.When("I fill in", ((string)(null)), table5, "When ");
|
||||
#line 52
|
||||
#line 26
|
||||
testRunner.And("I fill in", ((string)(null)), table1, "And ");
|
||||
#line 31
|
||||
testRunner.And("I hit \"Finish Setup\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 53
|
||||
#line 32
|
||||
testRunner.And("I go to \"/\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line 54
|
||||
#line 33
|
||||
testRunner.Then("I should see \"My Site\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
|
||||
#line 55
|
||||
#line 34
|
||||
testRunner.And("I should see \"Welcome, <strong><a href=\"/Users/Account/ChangePassword\">admin</a><" +
|
||||
"/strong>!\"", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
|
||||
#line hidden
|
||||
|
||||
@@ -9,7 +9,7 @@ Scenario: Dynamic compilation can be disabled
|
||||
When I go to "admin"
|
||||
Then I should see "<div id="orchard-version">Orchard v(?:\.\d+){2,4}</div>"
|
||||
|
||||
@ignore
|
||||
@ignore
|
||||
Scenario: Dynamic compilation will kick in if modules are deployed as source files only
|
||||
Given I have chosen to deploy modules as source files only
|
||||
And I have installed Orchard
|
||||
@@ -21,4 +21,4 @@ Scenario: Dynamic compilation can be forced by disabling the precompiled module
|
||||
Given I have chosen to load modules using dymamic compilation only
|
||||
And I have installed Orchard
|
||||
When I go to "admin"
|
||||
Then I should see "<div id="orchard-version">Orchard v(?:\.\d+){2,4}</div>"
|
||||
Then I should see "<div id="orchard-version">Orchard v(?:\.\d+){2,4}</div>"
|
||||
2
src/Orchard.Specs/SiteCompilation.feature.cs
generated
2
src/Orchard.Specs/SiteCompilation.feature.cs
generated
@@ -3,7 +3,7 @@
|
||||
// This code was generated by SpecFlow (http://www.specflow.org/).
|
||||
// SpecFlow Version:1.9.0.77
|
||||
// SpecFlow Generator Version:1.9.0.0
|
||||
// Runtime Version:4.0.30319.34014
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
using System.Web.Mvc;
|
||||
using NUnit.Framework;
|
||||
using Orchard.DynamicForms.Services.Models;
|
||||
using Orchard.DynamicForms.ValidationRules;
|
||||
|
||||
namespace Orchard.Tests.Modules.DynamicForms.ValidationRules {
|
||||
[TestFixture]
|
||||
public class EmailValidationTests {
|
||||
[SetUp]
|
||||
public void Init() {
|
||||
_context = new ValidateInputContext {ModelState = new ModelStateDictionary(), FieldName = "Email Address"};
|
||||
_validator = new EmailAddress();
|
||||
}
|
||||
|
||||
private ValidateInputContext _context;
|
||||
private EmailAddress _validator;
|
||||
|
||||
[Test]
|
||||
public void InvalidateDoubleDotDomain() {
|
||||
_context.AttemptedValue = "x@example..com";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void InvalidateMissingAt() {
|
||||
_context.AttemptedValue = "x.example.com";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void InvalidateMissingDomain() {
|
||||
_context.AttemptedValue = "x@";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void InvalidateMissingLocalPart() {
|
||||
_context.AttemptedValue = "@example.com";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.False);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ValidateMissingTLD() {
|
||||
_context.AttemptedValue = "something@localhost";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ValidateOneLetterTLD() {
|
||||
_context.AttemptedValue = "something@example.x";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ValidateTenLetterTLD() {
|
||||
_context.AttemptedValue = "something@example.accountant";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ValidateThreeLetterTLD() {
|
||||
_context.AttemptedValue = "something@example.com";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.True);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ValidateTwoLetterTLD() {
|
||||
_context.AttemptedValue = "something@example.io";
|
||||
|
||||
_validator.Validate(_context);
|
||||
|
||||
Assert.That(_context.ModelState.IsValid, Is.True);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -52,6 +53,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -81,8 +83,8 @@
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.1.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DotNetZip.1.9.1.8\lib\net20\Ionic.Zip.dll</HintPath>
|
||||
<Reference Include="DotNetZip">
|
||||
<HintPath>..\packages\DotNetZip.1.12.0\lib\net20\DotNetZip.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="IronRuby, Version=1.1.3.0, Culture=neutral, PublicKeyToken=7f709c5b713576e1, processorArchitecture=MSIL">
|
||||
@@ -199,6 +201,7 @@
|
||||
<Compile Include="CodeGeneration\Commands\CodeGenerationCommandsTests.cs" />
|
||||
<Compile Include="Comments\Services\CommentServiceTests.cs" />
|
||||
<Compile Include="DesignerTools\Services\ObjectDumperTests.cs" />
|
||||
<Compile Include="DynamicForms\ValidationRules\EmailValidationTests.cs" />
|
||||
<Compile Include="Email\EmailChannelTests.cs" />
|
||||
<Compile Include="ImageProcessing\ImageProcessingTests.cs" />
|
||||
<Compile Include="ImportExport\Services\ImportExportServiceTests.cs" />
|
||||
@@ -284,6 +287,10 @@
|
||||
<Project>{4A4595EF-6C37-4F99-96ED-4AE0B9E438D3}</Project>
|
||||
<Name>Orchard.DesignerTools</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.DynamicForms\Orchard.DynamicForms.csproj">
|
||||
<Project>{82190f52-2901-46d6-8a4c-34649959483f}</Project>
|
||||
<Name>Orchard.DynamicForms</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Orchard.Web\Modules\Orchard.Email\Orchard.Email.csproj">
|
||||
<Project>{05660f47-d649-48bd-9ded-df4e01e7cff9}</Project>
|
||||
<Name>Orchard.Email</Name>
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<CustomServerUrl>https://github.com/OrchardCMS/Orchard</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
|
||||
@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<packages>
|
||||
<package id="Autofac" version="3.5.2" targetFramework="net452" />
|
||||
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
|
||||
<package id="DotNetZip" version="1.9.1.8" targetFramework="net452" />
|
||||
<package id="DotNetZip" version="1.12" targetFramework="net452" />
|
||||
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
|
||||
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
|
||||
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Autofac;
|
||||
using NHibernate;
|
||||
@@ -13,13 +14,11 @@ using Orchard.Environment.Configuration;
|
||||
using Orchard.Environment.ShellBuilders.Models;
|
||||
using Orchard.FileSystems.AppData;
|
||||
using Orchard.Tests.ContentManagement;
|
||||
using System.IO;
|
||||
using Orchard.Tests.Environment;
|
||||
using Orchard.Tests.FileSystems.AppData;
|
||||
|
||||
namespace Orchard.Tests.DataMigration
|
||||
{
|
||||
[TestFixture]
|
||||
namespace Orchard.Tests.DataMigration {
|
||||
[TestFixture]
|
||||
public class SchemaBuilderTestsBase {
|
||||
private IContainer _container;
|
||||
private ISessionFactory _sessionFactory;
|
||||
@@ -100,6 +99,21 @@ namespace Orchard.Tests.DataMigration
|
||||
);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GenericCreateCommandShouldBeHandled() {
|
||||
_schemaBuilder
|
||||
.CreateTable("User", table => table
|
||||
.Column<int>("Id", column => column.PrimaryKey().Identity())
|
||||
.Column<string>("Firstname", column => column.WithLength(255))
|
||||
.Column<string>("Lastname", column => column.WithLength(100).NotNull())
|
||||
.Column<string>("SN", column => column.WithLength(40).Unique())
|
||||
.Column<decimal>("Salary", column => column.WithPrecision(9).WithScale(2))
|
||||
.Column<decimal>("Gender", column => column.WithDefault(""))
|
||||
.Column<Guid>("Identifier")
|
||||
.Column<byte[]>("Photo", column => column.WithLength(2048))
|
||||
);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DropTableCommandShouldBeHandled() {
|
||||
_schemaBuilder
|
||||
|
||||
@@ -196,7 +196,7 @@ Description: My super wiki module for Orchard.
|
||||
_folders.Manifests.Add("MyCompany.AnotherWiki", @"
|
||||
Name: AnotherWiki
|
||||
Author: Coder Notaprogrammer
|
||||
Website: http://anotherwiki.codeplex.com
|
||||
Website: https://github.com/MyCompany/AnotherWiki
|
||||
Version: 1.2.3
|
||||
OrchardVersion: 1
|
||||
Features:
|
||||
@@ -222,7 +222,7 @@ Features:
|
||||
Assert.That(descriptor.Id, Is.EqualTo("MyCompany.AnotherWiki"));
|
||||
Assert.That(descriptor.Name, Is.EqualTo("AnotherWiki"));
|
||||
Assert.That(descriptor.Author, Is.EqualTo("Coder Notaprogrammer"));
|
||||
Assert.That(descriptor.WebSite, Is.EqualTo("http://anotherwiki.codeplex.com"));
|
||||
Assert.That(descriptor.WebSite, Is.EqualTo("https://github.com/MyCompany/AnotherWiki"));
|
||||
Assert.That(descriptor.Version, Is.EqualTo("1.2.3"));
|
||||
Assert.That(descriptor.OrchardVersion, Is.EqualTo("1"));
|
||||
Assert.That(descriptor.Features.Count(), Is.EqualTo(5));
|
||||
@@ -277,7 +277,7 @@ Features:
|
||||
_folders.Manifests.Add("AnotherWiki", @"
|
||||
Name: AnotherWiki
|
||||
Author: Coder Notaprogrammer
|
||||
Website: http://anotherwiki.codeplex.com
|
||||
Website: https://github.com/MyCompany/AnotherWiki
|
||||
Version: 1.2.3
|
||||
OrchardVersion: 1
|
||||
Description: Module Description
|
||||
@@ -303,7 +303,7 @@ Features:
|
||||
Assert.That(descriptor.Id, Is.EqualTo("AnotherWiki"));
|
||||
Assert.That(descriptor.Name, Is.EqualTo("AnotherWiki"));
|
||||
Assert.That(descriptor.Author, Is.EqualTo("Coder Notaprogrammer"));
|
||||
Assert.That(descriptor.WebSite, Is.EqualTo("http://anotherwiki.codeplex.com"));
|
||||
Assert.That(descriptor.WebSite, Is.EqualTo("https://github.com/MyCompany/AnotherWiki"));
|
||||
Assert.That(descriptor.Version, Is.EqualTo("1.2.3"));
|
||||
Assert.That(descriptor.OrchardVersion, Is.EqualTo("1"));
|
||||
Assert.That(descriptor.Description, Is.EqualTo("Module Description"));
|
||||
|
||||
@@ -197,7 +197,7 @@ Features:
|
||||
Name: AnotherWiki
|
||||
SessionState: required
|
||||
Author: Coder Notaprogrammer
|
||||
Website: http://anotherwiki.codeplex.com
|
||||
Website: https://github.com/MyCompany/AnotherWiki
|
||||
Version: 1.2.3
|
||||
OrchardVersion: 1
|
||||
Features:
|
||||
@@ -223,7 +223,7 @@ Features:
|
||||
Assert.That(descriptor.Id, Is.EqualTo("MyCompany.AnotherWiki"));
|
||||
Assert.That(descriptor.Name, Is.EqualTo("AnotherWiki"));
|
||||
Assert.That(descriptor.Author, Is.EqualTo("Coder Notaprogrammer"));
|
||||
Assert.That(descriptor.WebSite, Is.EqualTo("http://anotherwiki.codeplex.com"));
|
||||
Assert.That(descriptor.WebSite, Is.EqualTo("https://github.com/MyCompany/AnotherWiki"));
|
||||
Assert.That(descriptor.Version, Is.EqualTo("1.2.3"));
|
||||
Assert.That(descriptor.OrchardVersion, Is.EqualTo("1"));
|
||||
Assert.That(descriptor.Features.Count(), Is.EqualTo(5));
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -52,6 +53,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
|
||||
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Autofac;
|
||||
using NUnit.Framework;
|
||||
using Orchard.DisplayManagement.Implementation;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Tests.Stubs;
|
||||
using Orchard.UI.Admin;
|
||||
using Orchard.UI.Resources;
|
||||
|
||||
namespace Orchard.Tests.UI.Resources {
|
||||
@@ -20,7 +18,7 @@ namespace Orchard.Tests.UI.Resources {
|
||||
public Action<ResourceManifest> DefineManifest { get; set; }
|
||||
|
||||
public TestManifestProvider() {
|
||||
|
||||
|
||||
}
|
||||
public void BuildManifests(ResourceManifestBuilder builder) {
|
||||
var manifest = builder.Add();
|
||||
@@ -40,6 +38,8 @@ namespace Orchard.Tests.UI.Resources {
|
||||
[SetUp]
|
||||
public void Init() {
|
||||
var builder = new ContainerBuilder();
|
||||
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
|
||||
builder.RegisterType<StubHttpContextAccessor>().As<IHttpContextAccessor>();
|
||||
builder.RegisterType<ResourceManager>().As<IResourceManager>();
|
||||
builder.RegisterType<TestManifestProvider>().As<IResourceManifestProvider>().SingleInstance();
|
||||
_container = builder.Build();
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
@@ -33,6 +34,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -32,8 +32,8 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
// Enable web application to call this assembly in Full Trust
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
@@ -52,6 +53,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
<Component Type="Orchard.FileSystems.Dependencies.DefaultExtensionDependenciesManager">
|
||||
<Properties>
|
||||
<!-- Set Value="true" to disable compiled dependencides files monitoring -->
|
||||
<!-- Set Value="true" to disable compiled dependencies files monitoring -->
|
||||
<Property Name="DisableMonitoring" Value="false"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
@@ -30,7 +30,11 @@ namespace Orchard.Core.Common {
|
||||
.Column<DateTime>("PublishedUtc")
|
||||
.Column<DateTime>("ModifiedUtc")
|
||||
.Column<int>("Container_id")
|
||||
);
|
||||
).AlterTable(nameof(CommonPartRecord), table => {
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_{nameof(CommonPartRecord.CreatedUtc)}", nameof(CommonPartRecord.CreatedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_{nameof(CommonPartRecord.ModifiedUtc)}", nameof(CommonPartRecord.ModifiedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_{nameof(CommonPartRecord.PublishedUtc)}", nameof(CommonPartRecord.PublishedUtc));
|
||||
});
|
||||
|
||||
SchemaBuilder.CreateTable("CommonPartVersionRecord",
|
||||
table => table
|
||||
@@ -39,7 +43,11 @@ namespace Orchard.Core.Common {
|
||||
.Column<DateTime>("PublishedUtc")
|
||||
.Column<DateTime>("ModifiedUtc")
|
||||
.Column<string>("ModifiedBy")
|
||||
);
|
||||
).AlterTable(nameof(CommonPartVersionRecord), table => {
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartVersionRecord)}_{nameof(CommonPartVersionRecord.CreatedUtc)}", nameof(CommonPartVersionRecord.CreatedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartVersionRecord)}_{nameof(CommonPartVersionRecord.ModifiedUtc)}", nameof(CommonPartVersionRecord.ModifiedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartVersionRecord)}_{nameof(CommonPartVersionRecord.PublishedUtc)}", nameof(CommonPartVersionRecord.PublishedUtc));
|
||||
});
|
||||
|
||||
SchemaBuilder.CreateTable("IdentityPartRecord",
|
||||
table => table
|
||||
@@ -59,7 +67,7 @@ namespace Orchard.Core.Common {
|
||||
.Attachable()
|
||||
.WithDescription("Automatically generates a unique identity for the content item, which is required in import/export scenarios where one content item references another."));
|
||||
|
||||
return 5;
|
||||
return 6;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
@@ -112,5 +120,62 @@ namespace Orchard.Core.Common {
|
||||
SchemaBuilder.AlterTable("CommonPartVersionRecord", table => table.AddColumn<string>("ModifiedBy", command => command.Nullable()));
|
||||
return 5;
|
||||
}
|
||||
|
||||
public int UpdateFrom5() {
|
||||
SchemaBuilder.AlterTable(nameof(CommonPartRecord), table => {
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_{nameof(CommonPartRecord.CreatedUtc)}", nameof(CommonPartRecord.CreatedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_{nameof(CommonPartRecord.ModifiedUtc)}", nameof(CommonPartRecord.ModifiedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_{nameof(CommonPartRecord.PublishedUtc)}", nameof(CommonPartRecord.PublishedUtc));
|
||||
});
|
||||
|
||||
SchemaBuilder.AlterTable(nameof(CommonPartVersionRecord), table => {
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartVersionRecord)}_{nameof(CommonPartVersionRecord.CreatedUtc)}", nameof(CommonPartVersionRecord.CreatedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartVersionRecord)}_{nameof(CommonPartVersionRecord.ModifiedUtc)}", nameof(CommonPartVersionRecord.ModifiedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartVersionRecord)}_{nameof(CommonPartVersionRecord.PublishedUtc)}", nameof(CommonPartVersionRecord.PublishedUtc));
|
||||
});
|
||||
|
||||
return 6;
|
||||
}
|
||||
|
||||
public int UpdateFrom6() {
|
||||
// Studying SQL Server query execution plans we noticed that when the system
|
||||
// tries to find content items for requests such as
|
||||
// "The items of type TTT owned by me, ordered from the most recent"
|
||||
// the existing indexes are not used. SQL Server does an index scan on the
|
||||
// Primary key for CommonPartRecord. This may lead to annoying deadlocks when
|
||||
// there are two concurrent transactions that are doing both this kind of query
|
||||
// as well as an update (or insert) in the CommonPartRecord.
|
||||
// Tests show that this can be easily fixed by adding a non-clustered index
|
||||
// with these keys: OwnerId, {one of PublishedUTC, ModifiedUTC, CreatedUTC}.
|
||||
// That means we need three indexes (one for each DateTime) to support ordering
|
||||
// on either of them.
|
||||
|
||||
// The queries we analyzed look like (in pseudo sql)
|
||||
// SELECT TOP (N) *
|
||||
// FROM
|
||||
// ContentItemVersionRecord this_
|
||||
// inner join ContentItemRecord contentite1_ on this_.ContentItemRecord_id=contentite1_.Id
|
||||
// inner join CommonPartRecord commonpart2_ on contentite1_.Id=commonpart2.Id
|
||||
// left outer join ContentTypeRecord contenttyp6_ on contentite1_.ContentType_id=contenttyp6_.Id
|
||||
// WHERE
|
||||
// contentite1.ContentType_id = {TTT}
|
||||
// and commonpart2_.OwnerId = {userid}
|
||||
// and this_.Published = 1
|
||||
// ORDER BY
|
||||
// commonpart2_PublishedUtc desc
|
||||
|
||||
SchemaBuilder.AlterTable(nameof(CommonPartRecord), table => {
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_OwnedBy_ByCreation",
|
||||
nameof(CommonPartRecord.OwnerId),
|
||||
nameof(CommonPartRecord.CreatedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_OwnedBy_ByModification",
|
||||
nameof(CommonPartRecord.OwnerId),
|
||||
nameof(CommonPartRecord.ModifiedUtc));
|
||||
table.CreateIndex($"IDX_{nameof(CommonPartRecord)}_OwnedBy_ByPublication",
|
||||
nameof(CommonPartRecord.OwnerId),
|
||||
nameof(CommonPartRecord.PublishedUtc));
|
||||
});
|
||||
return 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The common module introduces content parts that are going to be used by most content types (common, body, identity).
|
||||
FeatureDescription: Core content parts.
|
||||
Dependencies: Settings
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The containers module introduces container and containable behaviors for content items.
|
||||
FeatureDescription: Container and containable parts to enable parent-child relationships between content items.
|
||||
Dependencies: Contents, Feeds
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.Security;
|
||||
using Orchard.UI.Navigation;
|
||||
|
||||
@@ -44,9 +46,9 @@ namespace Orchard.Core.Contents {
|
||||
var createRouteValues = cim.CreateRouteValues;
|
||||
// review: the display name should be a LocalizedString
|
||||
if (createRouteValues.Any())
|
||||
menu.Add(T(contentTypeDefinition.DisplayName), "5", item => item.Action(cim.CreateRouteValues["Action"] as string, cim.CreateRouteValues["Controller"] as string, cim.CreateRouteValues)
|
||||
// Apply "PublishOwn" permission for the content type
|
||||
.Permission(DynamicPermissions.CreateDynamicPermission(DynamicPermissions.PermissionTemplates[Permissions.PublishOwnContent.Name], contentTypeDefinition)));
|
||||
menu.Add(T.Encode(contentTypeDefinition.DisplayName), "5", item => item.Action(cim.CreateRouteValues["Action"] as string, cim.CreateRouteValues["Controller"] as string, cim.CreateRouteValues)
|
||||
// Apply "CreateContent" permission for the content type
|
||||
.Permission(DynamicPermissions.CreateDynamicPermission(DynamicPermissions.PermissionTemplates[Permissions.CreateContent.Name], contentTypeDefinition)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -13,20 +13,19 @@ using Orchard.Core.Containers.Models;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Core.Contents.ViewModels;
|
||||
using Orchard.Data;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Localization.Services;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Mvc.Extensions;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.Settings;
|
||||
using Orchard.UI.Navigation;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Settings;
|
||||
using Orchard.Utility.Extensions;
|
||||
using Orchard.Localization.Services;
|
||||
|
||||
namespace Orchard.Core.Contents.Controllers {
|
||||
[ValidateInput(false)]
|
||||
public class AdminController : Controller, IUpdateModel {
|
||||
public class AdminController : ContentControllerBase, IUpdateModel {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly IContentDefinitionManager _contentDefinitionManager;
|
||||
private readonly ITransactionManager _transactionManager;
|
||||
@@ -36,24 +35,21 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
|
||||
public AdminController(
|
||||
IOrchardServices orchardServices,
|
||||
IContentManager contentManager,
|
||||
IContentDefinitionManager contentDefinitionManager,
|
||||
ITransactionManager transactionManager,
|
||||
ISiteService siteService,
|
||||
IShapeFactory shapeFactory,
|
||||
ICultureManager cultureManager,
|
||||
ICultureFilter cultureFilter) {
|
||||
ICultureFilter cultureFilter) : base(orchardServices.ContentManager) {
|
||||
Services = orchardServices;
|
||||
_contentManager = contentManager;
|
||||
_contentManager = orchardServices.ContentManager;
|
||||
_transactionManager = orchardServices.TransactionManager;
|
||||
_contentDefinitionManager = contentDefinitionManager;
|
||||
_transactionManager = transactionManager;
|
||||
_siteService = siteService;
|
||||
_cultureManager = cultureManager;
|
||||
_cultureFilter = cultureFilter;
|
||||
|
||||
T = NullLocalizer.Instance;
|
||||
Logger = NullLogger.Instance;
|
||||
Shape = shapeFactory;
|
||||
Shape = orchardServices.New;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
@@ -81,9 +77,9 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
}
|
||||
|
||||
var query = _contentManager.Query(versionOptions, GetListableTypes(false).Select(ctd => ctd.Name).ToArray());
|
||||
|
||||
ContentTypeDefinition contentTypeDefinition = null;
|
||||
if (!string.IsNullOrEmpty(model.TypeName)) {
|
||||
var contentTypeDefinition = _contentDefinitionManager.GetTypeDefinition(model.TypeName);
|
||||
contentTypeDefinition = _contentDefinitionManager.GetTypeDefinition(model.TypeName);
|
||||
if (contentTypeDefinition == null)
|
||||
return HttpNotFound();
|
||||
|
||||
@@ -110,11 +106,11 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
break;
|
||||
}
|
||||
|
||||
if(!String.IsNullOrWhiteSpace(model.Options.SelectedCulture)) {
|
||||
if (!String.IsNullOrWhiteSpace(model.Options.SelectedCulture)) {
|
||||
query = _cultureFilter.FilterCulture(query, model.Options.SelectedCulture);
|
||||
}
|
||||
|
||||
if(model.Options.ContentsStatus == ContentsStatus.Owner) {
|
||||
if (model.Options.ContentsStatus == ContentsStatus.Owner) {
|
||||
query = query.Where<CommonPartRecord>(cr => cr.OwnerId == Services.WorkContext.CurrentUser.Id);
|
||||
}
|
||||
|
||||
@@ -134,7 +130,7 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
var list = Shape.List();
|
||||
list.AddRange(pageOfContentItems.Select(ci => _contentManager.BuildDisplay(ci, "SummaryAdmin")));
|
||||
|
||||
var viewModel = Shape.ViewModel()
|
||||
var viewModel = Shape.ViewModel(ContentType: contentTypeDefinition)
|
||||
.ContentItems(list)
|
||||
.Pager(pagerShape)
|
||||
.Options(model.Options)
|
||||
@@ -145,7 +141,7 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
|
||||
private IEnumerable<ContentTypeDefinition> GetCreatableTypes(bool andContainable) {
|
||||
return _contentDefinitionManager.ListTypeDefinitions().Where(ctd =>
|
||||
Services.Authorizer.Authorize(Permissions.EditContent, _contentManager.New(ctd.Name)) &&
|
||||
Services.Authorizer.Authorize(Permissions.CreateContent, _contentManager.New(ctd.Name)) &&
|
||||
ctd.Settings.GetModel<ContentTypeSettings>().Creatable &&
|
||||
(!andContainable || ctd.Parts.Any(p => p.PartDefinition.Name == "ContainablePart")));
|
||||
}
|
||||
@@ -247,7 +243,12 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
|
||||
var contentItem = _contentManager.New(id);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Cannot create content")))
|
||||
var customRouteRedirection = GetCustomContentItemRouteRedirection(contentItem, ContentItemRoute.Create);
|
||||
if (customRouteRedirection != null) {
|
||||
return customRouteRedirection;
|
||||
}
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.CreateContent, contentItem, T("Cannot create content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
if (containerId.HasValue && contentItem.Is<ContainablePart>()) {
|
||||
@@ -313,6 +314,11 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
public ActionResult Edit(int id) {
|
||||
var contentItem = _contentManager.Get(id, VersionOptions.Latest);
|
||||
|
||||
var customRouteRedirection = GetCustomContentItemRouteRedirection(contentItem, ContentItemRoute.Editor);
|
||||
if (customRouteRedirection != null) {
|
||||
return customRouteRedirection;
|
||||
}
|
||||
|
||||
if (contentItem == null)
|
||||
return HttpNotFound();
|
||||
|
||||
@@ -393,7 +399,13 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
if (contentItem == null)
|
||||
return HttpNotFound();
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Couldn't clone content")))
|
||||
if (!Services.Authorizer.Authorize(Permissions.CreateContent, contentItem, T("Couldn't clone content")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
// pass a dummy content to the authorization check to check for "own" variations
|
||||
var dummyContent = _contentManager.New(contentItem.ContentType);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.EditContent, dummyContent, T("You do not have permission to edit (or create) content.")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
try {
|
||||
@@ -413,7 +425,7 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
public ActionResult Remove(int id, string returnUrl) {
|
||||
var contentItem = _contentManager.Get(id, VersionOptions.Latest);
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.DeleteContent, contentItem, T("Couldn't remove content")))
|
||||
if (!Services.Authorizer.Authorize(Permissions.DeleteContent, contentItem, T("You do not have permission to delete content.")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
if (contentItem != null) {
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Mvc.Extensions;
|
||||
|
||||
namespace Orchard.Core.Contents.Controllers {
|
||||
public abstract class ContentControllerBase : Controller {
|
||||
private readonly IContentManager _contentManager;
|
||||
|
||||
|
||||
public ContentControllerBase(IContentManager contentManager) {
|
||||
_contentManager = contentManager;
|
||||
}
|
||||
|
||||
|
||||
public RedirectToRouteResult GetCustomContentItemRouteRedirection(IContent content, ContentItemRoute contentItemRoute) {
|
||||
if (content == null) return null;
|
||||
|
||||
var itemMetadata = _contentManager.GetItemMetadata(content);
|
||||
var currentRoute = RouteData.Values;
|
||||
|
||||
bool isCustomRoute(RouteValueDictionary routeValues) =>
|
||||
!currentRoute.ToRouteString().Equals(routeValues.ToRouteString(), StringComparison.InvariantCultureIgnoreCase);
|
||||
|
||||
switch (contentItemRoute) {
|
||||
case ContentItemRoute.Admin:
|
||||
if (isCustomRoute(itemMetadata.AdminRouteValues))
|
||||
return RedirectToRoute(itemMetadata.AdminRouteValues);
|
||||
|
||||
break;
|
||||
case ContentItemRoute.Editor:
|
||||
if (isCustomRoute(itemMetadata.EditorRouteValues))
|
||||
return RedirectToRoute(itemMetadata.EditorRouteValues);
|
||||
|
||||
break;
|
||||
case ContentItemRoute.Create:
|
||||
if (isCustomRoute(itemMetadata.CreateRouteValues))
|
||||
return RedirectToRoute(itemMetadata.CreateRouteValues);
|
||||
|
||||
break;
|
||||
case ContentItemRoute.Display:
|
||||
if (isCustomRoute(itemMetadata.DisplayRouteValues))
|
||||
return RedirectToRoute(itemMetadata.DisplayRouteValues);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,28 +1,25 @@
|
||||
using System.Web.Mvc;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.DisplayManagement;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Mvc;
|
||||
using Orchard.Themes;
|
||||
|
||||
namespace Orchard.Core.Contents.Controllers {
|
||||
[Themed]
|
||||
public class ItemController : Controller {
|
||||
public class ItemController : ContentControllerBase {
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly IHttpContextAccessor _hca;
|
||||
|
||||
public ItemController(IContentManager contentManager,
|
||||
IShapeFactory shapeFactory,
|
||||
IOrchardServices services,
|
||||
IHttpContextAccessor hca) {
|
||||
_contentManager = contentManager;
|
||||
public ItemController(
|
||||
IOrchardServices orchardServices,
|
||||
IHttpContextAccessor hca) : base(orchardServices.ContentManager) {
|
||||
_contentManager = orchardServices.ContentManager;
|
||||
_hca = hca;
|
||||
Shape = shapeFactory;
|
||||
Services = services;
|
||||
Services = orchardServices;
|
||||
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
|
||||
dynamic Shape { get; set; }
|
||||
public IOrchardServices Services { get; private set; }
|
||||
public Localizer T { get; set; }
|
||||
|
||||
@@ -36,16 +33,21 @@ namespace Orchard.Core.Contents.Controllers {
|
||||
|
||||
var contentItem = _contentManager.Get(id.Value, VersionOptions.Published);
|
||||
|
||||
var customRouteRedirection = GetCustomContentItemRouteRedirection(contentItem, ContentItemRoute.Display);
|
||||
if (customRouteRedirection != null) {
|
||||
return customRouteRedirection;
|
||||
}
|
||||
|
||||
if (contentItem == null)
|
||||
return HttpNotFound();
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.ViewContent, contentItem, T("Cannot view content"))) {
|
||||
return new HttpUnauthorizedResult();
|
||||
}
|
||||
|
||||
|
||||
var model = _contentManager.BuildDisplay(contentItem);
|
||||
if (_hca.Current().Request.IsAjaxRequest()) {
|
||||
return new ShapePartialResult(this,model);
|
||||
return new ShapePartialResult(this, model);
|
||||
}
|
||||
|
||||
return View(model);
|
||||
|
||||
@@ -9,10 +9,11 @@ using Orchard.Security.Permissions;
|
||||
|
||||
namespace Orchard.Core.Contents {
|
||||
public class DynamicPermissions : IPermissionProvider {
|
||||
private static readonly Permission CreateContent = new Permission { Description = "Create {0}", Name = "Create_{0}", ImpliedBy = new[] { Permissions.CreateContent } };
|
||||
private static readonly Permission PublishContent = new Permission { Description = "Publish or unpublish {0} for others", Name = "Publish_{0}", ImpliedBy = new[] { Permissions.PublishContent } };
|
||||
private static readonly Permission PublishOwnContent = new Permission { Description = "Publish or unpublish {0}", Name = "PublishOwn_{0}", ImpliedBy = new[] { PublishContent, Permissions.PublishOwnContent } };
|
||||
private static readonly Permission EditContent = new Permission { Description = "Edit {0} for others", Name = "Edit_{0}", ImpliedBy = new[] { PublishContent, Permissions.EditContent } };
|
||||
private static readonly Permission EditOwnContent = new Permission { Description = "Edit {0}", Name = "EditOwn_{0}", ImpliedBy = new[] { EditContent, PublishOwnContent, Permissions.EditOwnContent } };
|
||||
private static readonly Permission EditOwnContent = new Permission { Description = "Edit {0}", Name = "EditOwn_{0}", ImpliedBy = new[] { CreateContent, EditContent, PublishOwnContent, Permissions.EditOwnContent } };
|
||||
private static readonly Permission DeleteContent = new Permission { Description = "Delete {0} for others", Name = "Delete_{0}", ImpliedBy = new[] { Permissions.DeleteContent } };
|
||||
private static readonly Permission DeleteOwnContent = new Permission { Description = "Delete {0}", Name = "DeleteOwn_{0}", ImpliedBy = new[] { DeleteContent, Permissions.DeleteOwnContent } };
|
||||
private static readonly Permission ViewContent = new Permission { Description = "View {0} by others", Name = "View_{0}", ImpliedBy = new[] { EditContent, Permissions.ViewContent } };
|
||||
@@ -30,7 +31,8 @@ namespace Orchard.Core.Contents {
|
||||
{Permissions.ViewContent.Name, ViewContent},
|
||||
{Permissions.ViewOwnContent.Name, ViewOwnContent},
|
||||
{Permissions.PreviewContent.Name, PreviewContent},
|
||||
{Permissions.PreviewOwnContent.Name, PreviewOwnContent}
|
||||
{Permissions.PreviewOwnContent.Name, PreviewOwnContent},
|
||||
{Permissions.CreateContent.Name, CreateContent}
|
||||
};
|
||||
|
||||
private readonly IContentDefinitionManager _contentDefinitionManager;
|
||||
|
||||
@@ -4,6 +4,9 @@ using Orchard.ContentManagement.Handlers;
|
||||
namespace Orchard.Core.Contents.Handlers {
|
||||
public class ContentsHandler : ContentHandlerBase {
|
||||
public override void GetContentItemMetadata(GetContentItemMetadataContext context) {
|
||||
if (string.IsNullOrWhiteSpace(context.Metadata.DisplayText))
|
||||
context.Metadata.DisplayText = context.ContentItem.ContentType;
|
||||
|
||||
if (context.Metadata.CreateRouteValues == null) {
|
||||
context.Metadata.CreateRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Contents"},
|
||||
@@ -12,6 +15,7 @@ namespace Orchard.Core.Contents.Handlers {
|
||||
{"Id", context.ContentItem.ContentType}
|
||||
};
|
||||
}
|
||||
|
||||
if (context.Metadata.EditorRouteValues == null) {
|
||||
context.Metadata.EditorRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Contents"},
|
||||
@@ -20,6 +24,7 @@ namespace Orchard.Core.Contents.Handlers {
|
||||
{"Id", context.ContentItem.Id}
|
||||
};
|
||||
}
|
||||
|
||||
if (context.Metadata.DisplayRouteValues == null) {
|
||||
context.Metadata.DisplayRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Contents"},
|
||||
@@ -28,6 +33,7 @@ namespace Orchard.Core.Contents.Handlers {
|
||||
{"Id", context.ContentItem.Id}
|
||||
};
|
||||
}
|
||||
|
||||
if (context.Metadata.RemoveRouteValues == null) {
|
||||
context.Metadata.RemoveRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Contents"},
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The contents module enables the creation of custom content types.
|
||||
Features:
|
||||
Contents
|
||||
|
||||
@@ -8,10 +8,11 @@ namespace Orchard.Core.Contents {
|
||||
// Note - in code you should demand PublishContent, EditContent, or DeleteContent
|
||||
// Do not demand the "Own" variations - those are applied automatically when you demand the main ones
|
||||
|
||||
public static readonly Permission CreateContent = new Permission { Description = "Create content", Name = "CreateContent" };
|
||||
public static readonly Permission PublishContent = new Permission { Description = "Publish or unpublish content for others", Name = "PublishContent" };
|
||||
public static readonly Permission PublishOwnContent = new Permission { Description = "Publish or unpublish own content", Name = "PublishOwnContent", ImpliedBy = new[] { PublishContent } };
|
||||
public static readonly Permission EditContent = new Permission { Description = "Edit content for others", Name = "EditContent", ImpliedBy = new[] { PublishContent } };
|
||||
public static readonly Permission EditOwnContent = new Permission { Description = "Edit own content", Name = "EditOwnContent", ImpliedBy = new[] { EditContent, PublishOwnContent } };
|
||||
public static readonly Permission EditOwnContent = new Permission { Description = "Edit own content", Name = "EditOwnContent", ImpliedBy = new[] { CreateContent, EditContent, PublishOwnContent } };
|
||||
public static readonly Permission DeleteContent = new Permission { Description = "Delete content for others", Name = "DeleteContent" };
|
||||
public static readonly Permission DeleteOwnContent = new Permission { Description = "Delete own content", Name = "DeleteOwnContent", ImpliedBy = new[] { DeleteContent } };
|
||||
public static readonly Permission ViewContent = new Permission { Description = "View all content", Name = "ViewContent", ImpliedBy = new[] { EditContent } };
|
||||
@@ -35,7 +36,8 @@ namespace Orchard.Core.Contents {
|
||||
ViewContent,
|
||||
ViewOwnContent,
|
||||
PreviewOwnContent,
|
||||
PreviewContent
|
||||
PreviewContent,
|
||||
CreateContent
|
||||
};
|
||||
}
|
||||
|
||||
@@ -43,22 +45,22 @@ namespace Orchard.Core.Contents {
|
||||
return new[] {
|
||||
new PermissionStereotype {
|
||||
Name = "Administrator",
|
||||
Permissions = new[] {PublishContent,EditContent,DeleteContent,PreviewContent}
|
||||
Permissions = new[] {PublishContent,EditContent,DeleteContent,PreviewContent, CreateContent }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Editor",
|
||||
Permissions = new[] {PublishContent,EditContent,DeleteContent,PreviewContent}
|
||||
Permissions = new[] {PublishContent,EditContent,DeleteContent, PreviewContent, CreateContent }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Moderator"
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Author",
|
||||
Permissions = new[] {PublishOwnContent,EditOwnContent,DeleteOwnContent,PreviewOwnContent}
|
||||
Permissions = new[] {PublishOwnContent,EditOwnContent,DeleteOwnContent,PreviewOwnContent, CreateContent }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Contributor",
|
||||
Permissions = new[] {EditOwnContent,PreviewOwnContent}
|
||||
Permissions = new[] {EditOwnContent,PreviewOwnContent, CreateContent }
|
||||
},
|
||||
new PermissionStereotype {
|
||||
Name = "Authenticated",
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
@{ Layout.Title = T("Create New Content").ToString(); }
|
||||
@using Orchard;
|
||||
@using Orchard.ContentManagement;
|
||||
@using Orchard.Core.Contents;
|
||||
|
||||
@{
|
||||
IOrchardServices _orchardServices;
|
||||
WorkContext.TryResolve<IOrchardServices>(out _orchardServices);
|
||||
|
||||
Layout.Title = T("Create New Content");
|
||||
}
|
||||
|
||||
@foreach (var type in Model.ContentTypes) {
|
||||
<p>@Html.ActionLink((string)type.DisplayName, "Create", new { Area = "Contents", Id = (string)type.Name, ContainerId = Model.ContainerId, ReturnUrl = Request.QueryString["ReturnUrl"] })</p>
|
||||
var content = _orchardServices.ContentManager.New(type.Name);
|
||||
|
||||
if (Authorizer.Authorize(Permissions.CreateContent, content)) {
|
||||
ContentItemMetadata metadata = _orchardServices.ContentManager.GetItemMetadata(content);
|
||||
|
||||
RouteValueDictionary createRouteValues = metadata.CreateRouteValues;
|
||||
createRouteValues.Add("ContainerId", Model.ContainerId);
|
||||
createRouteValues.Add("ReturnUrl", Request.QueryString["ReturnUrl"]);
|
||||
|
||||
var url = Url.RouteUrl(createRouteValues);
|
||||
|
||||
<p><a href="@url">@type.DisplayName</a></p>
|
||||
}
|
||||
}
|
||||
@@ -1,22 +1,51 @@
|
||||
@using Orchard.Core.Contents.ViewModels;
|
||||
@using Orchard;
|
||||
@using Orchard.ContentManagement;
|
||||
@using Orchard.Core.Contents;
|
||||
@using Orchard.Core.Contents.ViewModels;
|
||||
@using Orchard.Security;
|
||||
|
||||
@{
|
||||
IOrchardServices _orchardServices;
|
||||
WorkContext.TryResolve<IOrchardServices>(out _orchardServices);
|
||||
|
||||
var typeDisplayName = Model.TypeDisplayName;
|
||||
var pageTitle = T("Manage Content");
|
||||
var createLinkText = T("Create New Content");
|
||||
if (!string.IsNullOrWhiteSpace(typeDisplayName)) {
|
||||
// if no specific type is selected, we assume we should show the "Create" button
|
||||
var showCreateContentButton = string.IsNullOrWhiteSpace(typeDisplayName);
|
||||
IAuthorizationService _authorizationService;
|
||||
WorkContext.TryResolve<IAuthorizationService>(out _authorizationService);
|
||||
|
||||
if (!showCreateContentButton) {
|
||||
// being here it means there is a specific type we are considering
|
||||
pageTitle = T("Manage {0} Content", Html.Raw(typeDisplayName));
|
||||
createLinkText = T("Create New {0}", Html.Raw(typeDisplayName));
|
||||
var permission = DynamicPermissions
|
||||
.CreateDynamicPermission(DynamicPermissions.PermissionTemplates[Permissions.CreateContent.Name], Model.ContentType);
|
||||
if (_authorizationService.TryCheckAccess(permission, WorkContext.CurrentUser, null)) {
|
||||
showCreateContentButton = true;
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerable<string> cultures = Model.Options.Cultures;
|
||||
|
||||
|
||||
Layout.Title = pageTitle.Text;
|
||||
}
|
||||
|
||||
@if (showCreateContentButton) {
|
||||
<div class="manage">
|
||||
@Html.ActionLink(createLinkText.Text, "Create", new { Area = "Contents", Id = (string)Model.Options.SelectedFilter }, new { @class = "button primaryAction" })
|
||||
</div>
|
||||
@{
|
||||
if (!String.IsNullOrWhiteSpace((string)Model.Options.SelectedFilter)) {
|
||||
var content = _orchardServices.ContentManager.New(Model.Options.SelectedFilter);
|
||||
ContentItemMetadata metadata = _orchardServices.ContentManager.GetItemMetadata(content);
|
||||
|
||||
var url = Url.RouteUrl(metadata.CreateRouteValues);
|
||||
<a class="button primaryAction" href="@url">@createLinkText.Text</a>
|
||||
} else {
|
||||
@Html.ActionLink(createLinkText.Text, "Create", new { Area = "Contents", Id = (string)Model.Options.SelectedFilter }, new { @class = "button primaryAction" });
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@using (Html.BeginFormAntiForgeryPost()) {
|
||||
<fieldset class="bulk-actions">
|
||||
<label><input type="checkbox" class="check-all" />@T("Select all")</label>@T(" | ")
|
||||
@@ -65,7 +94,7 @@
|
||||
<button type="submit" name="submit.Filter" value="yes please">@T("Apply")</button>
|
||||
</fieldset>
|
||||
<fieldset class="contentItems bulk-items">
|
||||
@Display(Model.ContentItems)
|
||||
@Display(Model.ContentItems)
|
||||
</fieldset>
|
||||
@Display(Model.Pager)
|
||||
}
|
||||
@Display(Model.Pager)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@using Orchard.Utility.Extensions;
|
||||
@{
|
||||
ContentItem contentItem = Model.ContentItem;
|
||||
var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
|
||||
var returnUrl = ViewContext.RequestContext.HttpContext.Request.RawUrl;
|
||||
}
|
||||
<div class="summary" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
|
||||
<div class="properties">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@{
|
||||
ContentPart contentPart = Model.ContentPart;
|
||||
}
|
||||
@if (Authorizer.Authorize(Permissions.EditContent, contentPart)) {
|
||||
<a href="@Url.Action("Clone", "Admin", new { Id = Model.ContentItem.Id, ReturnUrl = Request.ToUrlString(), Area = "Contents" })" itemprop="UnsafeUrl">@T("Clone")</a>
|
||||
@if (Authorizer.Authorize(Permissions.CreateContent, contentPart)) {
|
||||
<a href="@Url.Action("Clone", "Admin", new { Id = Model.ContentItem.Id, ReturnUrl = Request.RawUrl, Area = "Contents" })" itemprop="UnsafeUrl">@T("Clone")</a>
|
||||
@T(" | ")
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
if (contentPart.HasDraft()) {
|
||||
if (Authorizer.Authorize(Permissions.PublishContent, contentPart)) {
|
||||
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
|
||||
@Html.Link(T("Publish Draft").Text, Url.Action("Publish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.RawUrl}), new {itemprop = "UnsafeUrl"})
|
||||
@T(" | ")
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
if (Authorizer.Authorize(Permissions.PublishContent, contentPart)) {
|
||||
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
|
||||
@Html.Link(T("Unpublish").Text, Url.Action("Unpublish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.RawUrl}), new {itemprop = "UnsafeUrl"})
|
||||
@T(" | ")
|
||||
}
|
||||
} else {
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
|
||||
if (Authorizer.Authorize(Permissions.PublishContent, contentPart)) {
|
||||
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.ToUrlString()}), new {itemprop = "UnsafeUrl"})
|
||||
@Html.Link(T("Publish").Text, Url.Action("Publish", "Admin", new {area = "Contents", id = contentPart.ContentItem.Id, returnUrl = Request.RawUrl}), new {itemprop = "UnsafeUrl"})
|
||||
@T(" | ")
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
|
||||
FeatureDescription: Standard admin dashboard.
|
||||
Category: Core
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The Feeds module is providing RSS feeds to content items.
|
||||
FeatureDescription: RSS feeds for content items.
|
||||
Category: Syndication
|
||||
|
||||
@@ -15,6 +15,12 @@ using System;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Logging;
|
||||
using Orchard.Exceptions;
|
||||
using Orchard.ContentManagement.Aspects;
|
||||
using Orchard.Utility.Extensions;
|
||||
using Orchard.Mvc.Html;
|
||||
using Orchard.Core.Contents.Settings;
|
||||
using Orchard.Data;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace Orchard.Core.Navigation.Controllers {
|
||||
[ValidateInput(false)]
|
||||
@@ -23,13 +29,19 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
private readonly INavigationManager _navigationManager;
|
||||
private readonly IEnumerable<IContentHandler> _handlers;
|
||||
private readonly IMenuManager _menuManager;
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly ITransactionManager _transactionManager;
|
||||
|
||||
public AdminController(
|
||||
IOrchardServices orchardServices,
|
||||
IContentManager contentManager,
|
||||
ITransactionManager transactionManager,
|
||||
IMenuService menuService,
|
||||
IMenuManager menuManager,
|
||||
INavigationManager navigationManager,
|
||||
IEnumerable<IContentHandler> handlers) {
|
||||
_contentManager = contentManager;
|
||||
_transactionManager = transactionManager;
|
||||
_menuService = menuService;
|
||||
_menuManager = menuManager;
|
||||
_navigationManager = navigationManager;
|
||||
@@ -88,7 +100,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
|
||||
[HttpPost, ActionName("Index")]
|
||||
public ActionResult IndexPOST(IList<MenuItemEntry> menuItemEntries, int? menuId) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, T("Couldn't manage the main menu")))
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, (menuId.HasValue) ? _menuService.GetMenu(menuId.Value) : null, T("Couldn't manage the main menu")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
// See https://github.com/OrchardCMS/Orchard/issues/948
|
||||
@@ -126,11 +138,11 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Delete(int id) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, T("Couldn't manage the main menu")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
MenuPart menuPart = _menuService.Get(id);
|
||||
int? menuId = null;
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, (menuPart != null) ? _menuService.GetMenu(menuPart.Menu.Id) : null, T("Couldn't manage the main menu")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
if (menuPart != null) {
|
||||
menuId = menuPart.Menu.Id;
|
||||
@@ -141,7 +153,7 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
.Select(x => x.As<MenuPart>())
|
||||
.ToList();
|
||||
|
||||
foreach (var menuItem in menuItems.Concat(new [] {menuPart})) {
|
||||
foreach (var menuItem in menuItems.Concat(new[] { menuPart })) {
|
||||
// if the menu item is a concrete content item, don't delete it, just unreference the menu
|
||||
if (!menuPart.ContentItem.TypeDefinition.Settings.ContainsKey("Stereotype") || menuPart.ContentItem.TypeDefinition.Settings["Stereotype"] != "MenuItem") {
|
||||
menuPart.Menu = null;
|
||||
@@ -173,25 +185,25 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
|
||||
if (menuPart == null)
|
||||
return HttpNotFound();
|
||||
|
||||
|
||||
// load the menu
|
||||
var menu = Services.ContentManager.Get(menuId);
|
||||
|
||||
if (menu == null)
|
||||
return HttpNotFound();
|
||||
|
||||
|
||||
try {
|
||||
// filter the content items for this specific menu
|
||||
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
||||
|
||||
menuPart.Menu = menu;
|
||||
var model = Services.ContentManager.BuildEditor(menuPart);
|
||||
|
||||
|
||||
return View(model);
|
||||
}
|
||||
catch (Exception exception) {
|
||||
if (exception.IsFatal()) {
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
Logger.Error(T("Creating menu item failed: {0}", exception.Message).Text);
|
||||
Services.Notifier.Error(T("Creating menu item failed: {0}", exception.Message));
|
||||
@@ -203,33 +215,85 @@ namespace Orchard.Core.Navigation.Controllers {
|
||||
public ActionResult CreateMenuItemPost(string id, int menuId, string returnUrl) {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, _menuService.GetMenu(menuId), T("Couldn't manage the main menu")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var menuPart = Services.ContentManager.New<MenuPart>(id);
|
||||
|
||||
if (menuPart == null)
|
||||
return HttpNotFound();
|
||||
|
||||
// load the menu
|
||||
var menu = Services.ContentManager.Get(menuId);
|
||||
|
||||
if (menu == null)
|
||||
return HttpNotFound();
|
||||
|
||||
var model = Services.ContentManager.UpdateEditor(menuPart, this);
|
||||
|
||||
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
||||
menuPart.Menu = menu;
|
||||
|
||||
var model = Services.ContentManager.UpdateEditor(menuPart, this);
|
||||
menuPart.MenuPosition = Position.GetNext(_navigationManager.BuildMenu(menu));
|
||||
Services.ContentManager.Create(menuPart);
|
||||
|
||||
if (!ModelState.IsValid) {
|
||||
Services.TransactionManager.Cancel();
|
||||
return View(model);
|
||||
}
|
||||
|
||||
Services.Notifier.Information(T("Your {0} has been added.", menuPart.TypeDefinition.DisplayName));
|
||||
|
||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("Index"));
|
||||
}
|
||||
|
||||
public ActionResult Edit(int id) {
|
||||
var contentItem = _contentManager.Get(id, VersionOptions.Latest);
|
||||
|
||||
if (contentItem == null)
|
||||
return HttpNotFound();
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, contentItem.Content.MenuPart.Menu, T("Couldn't manage the main menu")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
var model = _contentManager.BuildEditor(contentItem);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[HttpPost, ActionName("Edit")]
|
||||
[Mvc.FormValueRequired("submit.Save")]
|
||||
public ActionResult EditPOST(int id, string returnUrl) {
|
||||
return EditPOST(id, returnUrl, contentItem => {
|
||||
if (!contentItem.Has<IPublishingControlAspect>() && !contentItem.TypeDefinition.Settings.GetModel<ContentTypeSettings>().Draftable)
|
||||
_contentManager.Publish(contentItem);
|
||||
});
|
||||
}
|
||||
private ActionResult EditPOST(int id, string returnUrl, Action<ContentItem> conditionallyPublish) {
|
||||
var contentItem = _contentManager.Get(id, VersionOptions.DraftRequired);
|
||||
|
||||
if (contentItem == null)
|
||||
return HttpNotFound();
|
||||
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageMenus, contentItem.Content.MenuPart.Menu, T("Couldn't manage the main menu")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
string previousRoute = null;
|
||||
if (contentItem.Has<IAliasAspect>()
|
||||
&& !string.IsNullOrWhiteSpace(returnUrl)
|
||||
&& Request.IsLocalUrl(returnUrl)
|
||||
// only if the original returnUrl is the content itself
|
||||
&& String.Equals(returnUrl, Url.ItemDisplayUrl(contentItem), StringComparison.OrdinalIgnoreCase)
|
||||
) {
|
||||
previousRoute = contentItem.As<IAliasAspect>().Path;
|
||||
}
|
||||
|
||||
var model = _contentManager.UpdateEditor(contentItem, this);
|
||||
if (!ModelState.IsValid) {
|
||||
_transactionManager.Cancel();
|
||||
return View("Edit", model);
|
||||
}
|
||||
|
||||
conditionallyPublish(contentItem);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(returnUrl)
|
||||
&& previousRoute != null
|
||||
&& !String.Equals(contentItem.As<IAliasAspect>().Path, previousRoute, StringComparison.OrdinalIgnoreCase)) {
|
||||
returnUrl = Url.ItemDisplayUrl(contentItem);
|
||||
}
|
||||
|
||||
Services.Notifier.Information(string.IsNullOrWhiteSpace(contentItem.TypeDefinition.DisplayName)
|
||||
? T("Your content has been saved.")
|
||||
: T("Your {0} has been saved.", contentItem.TypeDefinition.DisplayName));
|
||||
|
||||
return this.RedirectLocal(returnUrl, () => RedirectToAction("Edit", new RouteValueDictionary { { "Id", contentItem.Id } }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace Orchard.Core.Navigation.Drivers {
|
||||
|
||||
protected override DriverResult Editor(MenuItemPart part, dynamic shapeHelper) {
|
||||
var currentUser = _workContextAccessor.GetContext().CurrentUser;
|
||||
if (!_authorizationService.TryCheckAccess(Permissions.ManageMenus, currentUser, part))
|
||||
var menu = ((dynamic)part.ContentItem).MenuPart.Menu;
|
||||
if (!_authorizationService.TryCheckAccess(Permissions.ManageMenus, currentUser, menu)) // tests if the current user has permissions to manage that specific menu
|
||||
return null;
|
||||
|
||||
return ContentShape("Parts_MenuItem_Edit",
|
||||
@@ -24,7 +25,8 @@ namespace Orchard.Core.Navigation.Drivers {
|
||||
|
||||
protected override DriverResult Editor(MenuItemPart part, IUpdateModel updater, dynamic shapeHelper) {
|
||||
var currentUser = _workContextAccessor.GetContext().CurrentUser;
|
||||
if (!_authorizationService.TryCheckAccess(Permissions.ManageMenus, currentUser, part))
|
||||
var menu = ((dynamic)part.ContentItem).MenuPart.Menu;
|
||||
if (!_authorizationService.TryCheckAccess(Permissions.ManageMenus, currentUser, menu)) // tests if the current user has permissions to manage that specific menu
|
||||
return null;
|
||||
|
||||
if (updater != null) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Web.Routing;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.ContentManagement.Handlers;
|
||||
using Orchard.Core.Navigation.Models;
|
||||
@@ -17,21 +18,21 @@ namespace Orchard.Core.Navigation.Handlers {
|
||||
Filters.Add(StorageFilter.For(menuPartRepository));
|
||||
|
||||
OnInitializing<MenuPart>((ctx, x) => {
|
||||
x.MenuText = String.Empty;
|
||||
});
|
||||
x.MenuText = String.Empty;
|
||||
});
|
||||
|
||||
OnActivated<MenuPart>(PropertySetHandlers);
|
||||
}
|
||||
|
||||
protected void PropertySetHandlers(ActivatedContentContext context, MenuPart menuPart) {
|
||||
menuPart.MenuField.Setter(menu => {
|
||||
if(menu == null || menu.ContentItem == null) {
|
||||
if (menu == null || menu.ContentItem == null) {
|
||||
menuPart.Record.MenuId = 0;
|
||||
}
|
||||
else {
|
||||
menuPart.Record.MenuId = menu.ContentItem.Id;
|
||||
menuPart.Record.MenuId = menu.ContentItem.Id;
|
||||
}
|
||||
|
||||
|
||||
return menu;
|
||||
});
|
||||
|
||||
@@ -47,6 +48,18 @@ namespace Orchard.Core.Navigation.Handlers {
|
||||
string stereotype;
|
||||
if (context.ContentItem.TypeDefinition.Settings.TryGetValue("Stereotype", out stereotype) && stereotype == "MenuItem") {
|
||||
context.Metadata.DisplayText = part.MenuText;
|
||||
context.Metadata.EditorRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Navigation"},
|
||||
{"Controller", "Admin"},
|
||||
{"Action", "Edit"},
|
||||
{"Id", context.ContentItem.Id}
|
||||
};
|
||||
context.Metadata.RemoveRouteValues = new RouteValueDictionary {
|
||||
{"Area", "Navigation"},
|
||||
{"Controller", "Admin"},
|
||||
{"Action", "Delete"},
|
||||
{"Id", context.ContentItem.Id}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu.
|
||||
FeatureDescription: Menu management.
|
||||
Category: Core
|
||||
|
||||
15
src/Orchard.Web/Core/Navigation/Views/Admin/Edit.cshtml
Normal file
15
src/Orchard.Web/Core/Navigation/Views/Admin/Edit.cshtml
Normal file
@@ -0,0 +1,15 @@
|
||||
@{
|
||||
var typeDisplayName = Model.ContentItem.TypeDefinition.DisplayName;
|
||||
var pageTitle = T("Edit Menu Item");
|
||||
if (!string.IsNullOrWhiteSpace(typeDisplayName)) {
|
||||
pageTitle = T("Edit {0}", typeDisplayName);
|
||||
}
|
||||
|
||||
Layout.Title = pageTitle;
|
||||
}
|
||||
|
||||
@using (Html.BeginFormAntiForgeryPost(Url.Action("Edit"), FormMethod.Post, new { enctype = "multipart/form-data", @class= "no-multisubmit" })) {
|
||||
@Html.ValidationSummary()
|
||||
// Model is a Shape, calling Display() so that it is rendered using the most specific template for its Shape type
|
||||
@Display(Model)
|
||||
}
|
||||
@@ -116,7 +116,7 @@
|
||||
<span class="navigation-actions">
|
||||
<input type="hidden" name="@Html.NameOf(m => m.MenuItemEntries[i].MenuItemId)" value="@menuPartEntry.MenuItemId" />
|
||||
@Html.ItemEditLink(T("Edit").Text, menuPartEntry.ContentItem, new { returnUrl = Request.RawUrl })@T(" | ")
|
||||
@Html.ActionLink(T("Delete").Text, "Delete", new { id = menuPartEntry.MenuItemId }, new { @class = "remove", itemprop = "RemoveUrl UnsafeUrl" })
|
||||
@Html.Link(T("Delete").Text, Url.ItemRemoveUrl(menuPartEntry.ContentItem,null), new { itemprop = "RemoveUrl UnsafeUrl" })
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,51 +1,51 @@
|
||||
@model Orchard.Core.Navigation.ViewModels.MenuWidgetViewModel
|
||||
|
||||
@using Orchard.ContentManagement
|
||||
@using Orchard.Core.Navigation.Models;
|
||||
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.CurrentMenuId, T("For Menu"))
|
||||
<select id="@Html.FieldIdFor(m => m.CurrentMenuId)" name="@Html.FieldNameFor(m => m.CurrentMenuId)">
|
||||
@foreach(ContentItem menu in Model.Menus) {
|
||||
@Html.SelectOption(Model.CurrentMenuId, menu.Id, Html.ItemDisplayText(menu, false).ToString())
|
||||
}
|
||||
</select>
|
||||
<span class="hint">@T("Select which menu you want to display")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.CurrentMenuId, T("For Menu"))
|
||||
<select id="@Html.FieldIdFor(m => m.CurrentMenuId)" name="@Html.FieldNameFor(m => m.CurrentMenuId)">
|
||||
@foreach(ContentItem menu in Model.Menus) {
|
||||
@Html.SelectOption(Model.CurrentMenuId, menu.Id, Html.ItemDisplayText(menu, false).ToString())
|
||||
}
|
||||
</select>
|
||||
<span class="hint">@T("Select which menu you want to display")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.StartLevel)">@T("Start Level")</label>
|
||||
@Html.TextBoxFor(m => m.StartLevel, new { @class = "text small" })
|
||||
<span class="hint">@T("The level the menu should start at.")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.StartLevel)">@T("Start Level")</label>
|
||||
@Html.TextBoxFor(m => m.StartLevel, new { @class = "text small" })
|
||||
<span class="hint">@T("The level the menu should start at.")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.StopLevel)">@T("Levels to display")</label>
|
||||
@Html.TextBoxFor(m => m.StopLevel, new { @class = "text small" })
|
||||
<span class="hint">@T("The number of levels to display, \"0\" meaning all levels.")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="@Html.FieldIdFor(m => m.StopLevel)">@T("Levels to display")</label>
|
||||
@Html.TextBoxFor(m => m.StopLevel, new { @class = "text small" })
|
||||
<span class="hint">@T("The number of levels to display, \"0\" meaning all levels.")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.Breadcrumb)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Breadcrumb)">@T("Display as Breadcrumb")</label>
|
||||
<span class="hint">@T("Check to render the path to the current content item.")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.Breadcrumb)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Breadcrumb)">@T("Display as Breadcrumb")</label>
|
||||
<span class="hint">@T("Check to render the path to the current content item.")</span>
|
||||
</fieldset>
|
||||
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.Breadcrumb)">
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.AddHomePage)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.AddHomePage)">@T("Add the home page as the first element")</label>
|
||||
<span class="hint">@T("Check to render the home page as the first element of the breadcrumb.")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.AddCurrentPage)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.AddCurrentPage)">@T("Add the current content item as the last element")</label>
|
||||
<span class="hint">@T("Check to render the current content item as the last element.")</span>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.Breadcrumb)">
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.AddHomePage)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.AddHomePage)">@T("Add the home page as the first element")</label>
|
||||
<span class="hint">@T("Check to render the home page as the first element of the breadcrumb.")</span>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.ShowFullMenu)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.ShowFullMenu)">@T("No filter on selected page")</label>
|
||||
<span class="hint">@T("Check for the menu to be display without filtering the selected current page.")</span>
|
||||
</fieldset>
|
||||
@Html.EditorFor(m => m.AddCurrentPage)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.AddCurrentPage)">@T("Add the current content item as the last element")</label>
|
||||
<span class="hint">@T("Check to render the current content item as the last element.")</span>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
@Html.EditorFor(m => m.ShowFullMenu)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.ShowFullMenu)">@T("No filter on selected page")</label>
|
||||
<span class="hint">@T("Check for the menu to be displayed without filtering the selected current page.")</span>
|
||||
</fieldset>
|
||||
@@ -5,7 +5,7 @@
|
||||
@if (!Model.ContentItem.TypeDefinition.Settings.ContainsKey("Stereotype") || Model.ContentItem.TypeDefinition.Settings["Stereotype"] != "MenuItem") {
|
||||
|
||||
<fieldset>
|
||||
|
||||
|
||||
@Html.EditorFor(m => m.OnMenu)
|
||||
<label for="@Html.FieldIdFor(m => m.OnMenu)" class="forcheckbox">@T("Show on a menu")</label>
|
||||
<div data-controllerid="@Html.FieldIdFor(m => m.OnMenu)" class="">
|
||||
@@ -24,13 +24,13 @@
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
<fieldset>
|
||||
<label for="MenuText">@T("Menu text")</label>
|
||||
@Html.TextBoxFor(m => m.MenuText, new { @class = "text medium", autofocus = "autofocus" })
|
||||
<span class="hint">@T("The text that should appear in the menu.")</span>
|
||||
@Html.HiddenFor(m => m.OnMenu, true)
|
||||
@Html.HiddenFor(m => m.CurrentMenuId, Request["menuId"])
|
||||
@Html.Hidden(Html.NameOf(m => m.OnMenu), true)
|
||||
@Html.Hidden(Html.NameOf(m => m.CurrentMenuId), !string.IsNullOrWhiteSpace(Request["menuId"]) ? Request["menuId"] : Model.CurrentMenuId.ToString())
|
||||
</fieldset>
|
||||
|
||||
}
|
||||
@@ -35,6 +35,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
@@ -46,12 +47,13 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -156,6 +158,7 @@
|
||||
<Compile Include="Containers\ViewModels\ContainerViewModel.cs" />
|
||||
<Compile Include="Containers\ViewModels\ContainerTypePartSettingsViewModel.cs" />
|
||||
<Compile Include="Containers\ViewModels\ContainerWidgetViewModel.cs" />
|
||||
<Compile Include="Contents\Controllers\ContentControllerBase.cs" />
|
||||
<Compile Include="Contents\ControlWrapper.cs" />
|
||||
<Compile Include="Contents\Security\AuthorizationEventHandler.cs" />
|
||||
<Compile Include="Common\Services\BbcodeFilter.cs" />
|
||||
@@ -610,6 +613,9 @@
|
||||
<ItemGroup>
|
||||
<Content Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Navigation\Views\Admin\Edit.cshtml" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
@@ -648,7 +654,7 @@
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<CustomServerUrl>https://github.com/OrchardCMS/Orchard</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The dashboard module is providing the reports screen of the application.
|
||||
FeatureDescription: Reports management.
|
||||
Category: Core
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The scheduling module enables background task scheduling.
|
||||
FeatureDescription: Scheduled background tasks.
|
||||
Category: Core
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Orchard.Core.Settings.Descriptor {
|
||||
private readonly IRepository<ShellDescriptorRecord> _shellDescriptorRepository;
|
||||
private readonly IShellDescriptorManagerEventHandler _events;
|
||||
private readonly ShellSettings _shellSettings;
|
||||
|
||||
private ShellDescriptorRecord _shellDescriptorRecord;
|
||||
public ShellDescriptorManager(
|
||||
IRepository<ShellDescriptorRecord> shellDescriptorRepository,
|
||||
IShellDescriptorManagerEventHandler events,
|
||||
@@ -51,7 +51,10 @@ namespace Orchard.Core.Settings.Descriptor {
|
||||
}
|
||||
|
||||
private ShellDescriptorRecord GetDescriptorRecord() {
|
||||
return _shellDescriptorRepository.Get(x => x != null);
|
||||
if (_shellDescriptorRecord == null) {
|
||||
_shellDescriptorRecord = _shellDescriptorRepository.Get(x => x != null);
|
||||
}
|
||||
return _shellDescriptorRecord;
|
||||
}
|
||||
|
||||
public void UpdateShellDescriptor(int priorSerialNumber, IEnumerable<ShellFeature> enabledFeatures, IEnumerable<ShellParameter> parameters) {
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The settings module creates site settings that other modules can contribute to.
|
||||
FeatureDescription: Site settings.
|
||||
Category: Core
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Orchard.Core.Settings.State {
|
||||
};
|
||||
}
|
||||
private ShellStateRecord GetExistingOrNewShellStateRecord() {
|
||||
//Fix for https://orchard.codeplex.com/workitem/21176 / https://github.com/OrchardCMS/Orchard/issues/6075 change to get ensure ShellState record only retrieved once.
|
||||
//Fix for https://github.com/OrchardCMS/Orchard/issues/6075 change to get ensure ShellState record only retrieved once.
|
||||
var shellStateRecordId = _cacheManager.Get("ShellStateRecordId", ctx => {
|
||||
var shellState = _shellStateRepository.Table.FirstOrDefault();
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The shapes module contains core shape templates and display hooks.
|
||||
FeatureDescription: Core shape templates and display hooks.
|
||||
Category: Core
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The title module enables content items to have titles.
|
||||
FeatureDescription: Title content part.
|
||||
Category: Core
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter.
|
||||
FeatureDescription: XML-RPC opt-in implementation.
|
||||
Category: Content Publishing
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.8" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -36,6 +36,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -46,6 +47,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
@@ -57,8 +59,8 @@
|
||||
<HintPath>..\..\..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
@@ -169,7 +171,7 @@
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<CustomServerUrl>https://github.com/OrchardCMS/Orchard</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site.
|
||||
FeatureDescription: Lucene indexing services.
|
||||
Dependencies: Orchard.Indexing
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.8" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net452" />
|
||||
<package id="SharpZipLib" version="0.86.0" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -26,6 +26,7 @@
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<Use64BitIISExpress />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -35,6 +36,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -45,16 +47,16 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MarkdownSharp, Version=1.5.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\StackExchange.MarkdownSharp.1.5.1.0\lib\net35\MarkdownSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Reference Include="Markdig.Signed, Version=0.18.0.0, Culture=neutral, PublicKeyToken=870da25a133885f8, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Markdig.Signed.0.18.0\lib\net40\Markdig.Signed.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -218,7 +220,7 @@
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<CustomServerUrl>https://github.com/OrchardCMS/Orchard</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: The Markdown module enables rich text contents to be created using the Markdown syntax.
|
||||
FeatureDescription: Markdown editor.
|
||||
Category: Input Editor
|
||||
|
||||
@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Web.ApplicationServices;
|
||||
using Orchard.Services;
|
||||
|
||||
namespace Markdown.Services {
|
||||
@@ -12,9 +11,7 @@ namespace Markdown.Services {
|
||||
if (string.IsNullOrEmpty(text))
|
||||
return string.Empty;
|
||||
|
||||
var markdown = new MarkdownSharp.Markdown();
|
||||
|
||||
return markdown.Transform(text);
|
||||
return Markdig.Markdown.ToHtml(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Markdig.Signed" version="0.18.0" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.8" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net452" />
|
||||
<package id="StackExchange.MarkdownSharp" version="1.5.1.0" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -28,7 +28,7 @@ namespace Orchard.Alias.Implementation {
|
||||
}
|
||||
|
||||
public RouteValueDictionary Get(string aliasPath) {
|
||||
return _aliasStorage.Get(aliasPath).ToRouteValueDictionary();
|
||||
return _aliasStorage.Get(aliasPath)?.ToRouteValueDictionary();
|
||||
}
|
||||
|
||||
public void Set(string aliasPath, RouteValueDictionary routeValues, string aliasSource, bool isManaged) {
|
||||
|
||||
@@ -2,8 +2,8 @@ Name: Alias
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: Maps friendly urls to specific module actions.
|
||||
FeatureDescription: Maps friendly urls to specific module actions.
|
||||
Category: Content
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
@@ -45,13 +46,14 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.8\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@@ -192,7 +194,7 @@
|
||||
</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>True</UseCustomServer>
|
||||
<CustomServerUrl>http://orchard.codeplex.com</CustomServerUrl>
|
||||
<CustomServerUrl>https://github.com/OrchardCMS/Orchard</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
|
||||
@@ -30,6 +30,6 @@ using System.Security;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.10.2")]
|
||||
[assembly: AssemblyFileVersion("1.10.2")]
|
||||
[assembly: AssemblyVersion("1.10.3")]
|
||||
[assembly: AssemblyFileVersion("1.10.3")]
|
||||
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- Registering Roslyn as a compiler for Razor IntelliSense. -->
|
||||
<appSettings>
|
||||
<add key="aspnet:RoslynCompilerLocation" value="..\..\bin\roslyn" />
|
||||
</appSettings>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.8.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" />
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:latest" />
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<system.web>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.8" targetFramework="net452" />
|
||||
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.1" targetFramework="net452" />
|
||||
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net452" />
|
||||
</packages>
|
||||
@@ -13,6 +13,7 @@ using Orchard.Logging;
|
||||
using Orchard.UI.Admin;
|
||||
using Orchard.UI.Notify;
|
||||
using Orchard.Services;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Orchard.AntiSpam.Drivers {
|
||||
public class ReCaptchaPartDriver : ContentPartDriver<ReCaptchaPart> {
|
||||
@@ -35,14 +36,16 @@ namespace Orchard.AntiSpam.Drivers {
|
||||
public Localizer T { get; set; }
|
||||
public ILogger Logger { get; set; }
|
||||
protected override DriverResult Editor(ReCaptchaPart part, dynamic shapeHelper) {
|
||||
var workContext = _workContextAccessor.GetContext();
|
||||
|
||||
// don't display the part in the admin
|
||||
if (AdminFilter.IsApplied(workContext.HttpContext.Request.RequestContext)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
// we want to be returning a shape even when it should display nothing, because
|
||||
// other features may need the Shape's type, or some other of its properties
|
||||
return ContentShape("Parts_ReCaptcha_Fields", () => {
|
||||
var workContext = _workContextAccessor.GetContext();
|
||||
// don't display the part in the admin
|
||||
if (AdminFilter.IsApplied(workContext.HttpContext.Request.RequestContext)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var settings = workContext.CurrentSite.As<ReCaptchaSettingsPart>();
|
||||
|
||||
if (settings.TrustAuthenticatedUsers && workContext.CurrentUser != null) {
|
||||
@@ -73,7 +76,7 @@ namespace Orchard.AntiSpam.Drivers {
|
||||
var context = workContext.HttpContext;
|
||||
|
||||
try {
|
||||
var result = ExecuteValidateRequest(
|
||||
var result = ValidateRequest(//ExecuteValidateRequest(
|
||||
settings.PrivateKey,
|
||||
context.Request.ServerVariables["REMOTE_ADDR"],
|
||||
context.Request.Form["g-recaptcha-response"]
|
||||
@@ -104,13 +107,27 @@ namespace Orchard.AntiSpam.Drivers {
|
||||
return Editor(part, shapeHelper);
|
||||
}
|
||||
|
||||
private static string ExecuteValidateRequest(string privateKey, string remoteip, string response) {
|
||||
var postData = String.Format(CultureInfo.InvariantCulture,
|
||||
// temporarily save <postData, response> pairs, to prevent sending the same exact request
|
||||
// more than once in a single Request.
|
||||
private Dictionary<string, string> ValidationResponse;
|
||||
|
||||
private string ValidateRequest(string privateKey, string remoteip, string response) {
|
||||
if (ValidationResponse == null) {
|
||||
ValidationResponse = new Dictionary<string, string>();
|
||||
}
|
||||
var postData = string.Format(CultureInfo.InvariantCulture,
|
||||
"secret={0}&response={1}&remoteip={2}",
|
||||
privateKey,
|
||||
response,
|
||||
remoteip
|
||||
);
|
||||
if (!ValidationResponse.ContainsKey(postData)) {
|
||||
ValidationResponse.Add(postData, ExecuteValidateRequest(postData));
|
||||
}
|
||||
return ValidationResponse[postData];
|
||||
}
|
||||
|
||||
private static string ExecuteValidateRequest(string postData) {
|
||||
|
||||
WebRequest request = WebRequest.Create(ReCaptchaSecureUrl + "?" + postData);
|
||||
request.Method = "GET";
|
||||
@@ -123,5 +140,6 @@ namespace Orchard.AntiSpam.Drivers {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@ Name: AntiSpam
|
||||
AntiForgery: enabled
|
||||
Author: The Orchard Team
|
||||
Website: http://orchardproject.net
|
||||
Version: 1.10.2
|
||||
OrchardVersion: 1.9
|
||||
Version: 1.10.3
|
||||
OrchardVersion: 1.10.3
|
||||
Description: Provides anti-spam services to protect your content from malicious submissions.
|
||||
Features:
|
||||
Orchard.AntiSpam:
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user