Compare commits

..

152 Commits

Author SHA1 Message Date
Matteo Piovanelli
5360b84a0f Revert "Fix/8392 remeber me model state exception (#8410)"
This reverts commit 3ceda381c5.
2020-09-07 14:10:07 +02:00
Hermes Sbicego
3ceda381c5 Fix/8392 remeber me model state exception (#8410)
@sebastienros this fixes the possible NRE that would happen for absent models from merged #8393 
(see your comment there https://github.com/OrchardCMS/Orchard/pull/8393#issuecomment-686630198)
2020-09-04 09:12:10 +02:00
Hermes Sbicego
c566e12abd Fixes Boolean Conversion error (#8393) 2020-09-03 10:07:47 -07:00
Matteo Piovanelli
868ce12ad6 fix for CPF when other scripts are also adding to sessionStorage (#8404) 2020-07-30 10:04:43 -07:00
Imran Azad
c62203116f Update DistributedLockService.cs (#8398) 2020-07-09 10:09:35 -07:00
Imran Azad
df2bdb3e5c Remove lock from the dictionary when the task has completed. (#8395)
Fixes #8391
2020-06-18 10:19:44 -07:00
Matteo Piovanelli
2bc7079593 tokens sort criteria (#8382)
* Tokenized state for sort criteria

* Tokenized state also in the other place where sort criteria are used
2020-06-05 12:37:35 +02:00
Matteo Piovanelli
f0c5b62b20 Process ignored paths while being aware of RequestUrlPrefix (#8384)
* Process ignored paths while being aware of RequestUrlPrefix

* Fix: I had moved a Trim to the wrong place

* Fixed issue with empty/uninitialized null set of ignored urls
2020-06-05 12:37:21 +02:00
Matteo Piovanelli
488e18d11a Updated UI for projections (#8380)
Some textboxes were too small for the actual text users would generally write in them.
Those meant to hold HTML have been converted to textareas.
2020-05-21 10:08:12 -07:00
Matteo Piovanelli
f581d235d2 Memorize query results in blog service (#8374)
The query for all published blogs is being called twice while building the admin menu,
so we are memorizing its results.
2020-05-14 10:29:59 -07:00
Matteo Piovanelli
9392718d3e Cache list of configured layers (#8373)
On every page load on frontend we were querying for all existing layers to test
for the ones that are currently active. Since that information is not bound to
change often, we added a cache layer to prevent querying every time. The cache
is evicted whenever a Layer gets updated.
2020-05-07 10:35:53 -07:00
Matteo Piovanelli
60464035f7 Save MemberBindingRecords in memory (#8371)
Prevent fetching the same table from the database 5+ times per request by
loading it and saving it in a private property for a request.
2020-05-07 10:29:58 -07:00
Matteo Piovanelli
a75203b883 Attempted AutoroutePart improvement (#8360)
This should ease Database issues, because it short circuits some code paths
through aliases.
2020-04-30 10:09:33 -07:00
Matteo Piovanelli
b2a8e92a53 Added a new index to CommonPartRecord (#8362) 2020-04-30 10:08:10 -07:00
Hermes Sbicego
c1374f9be9 Reuse Settings_ShellDescriptorRecord during an http request (#8355) 2020-04-30 10:05:57 -07:00
Matteo Piovanelli
b523b342d6 Added admin search permissions (#8346) 2020-04-16 10:22:20 -07:00
Hermes Sbicego
21cb531949 Fixes errors during Indexing (#8349) 2020-04-16 10:17:56 -07:00
Matteo Piovanelli
d57af5860a Added tokenizable default value to ContentPickerFields (#8351) 2020-04-16 10:13:30 -07:00
Lombiq
dbc1e61069 Adding NuGet config file to keep packages in the packages folder and thus be able to build the solution with the current NuGet version 2020-04-07 22:06:10 +02:00
ElenaRepository
55f0115459 replace code with static method (#8337)
Co-authored-by: elena.lampugnani <elena.lampugnani@laser-group.com>
2020-03-26 12:03:56 -07:00
Hermes Sbicego
e4b251b9ce - Moved condition of ContentType not null in a try catch statement to handle the case the ContentItem was destroyed (#8335) 2020-03-19 12:05:53 -07:00
Sébastien Ros
27e6401965 Add a fake transparent background for image thumbnails (#8329) 2020-03-05 14:35:11 -08:00
Hermes Sbicego
5015809444 Adds a link "View" in "Admin/Index.cshtml" to see how it looks the Taxonomony on the front-end (#8323)
Fixes #8322
2020-02-13 12:09:35 -08:00
Andrew Cartwright
0469c3a2fd Remove ArchiveLaterTask if content item is deleted (#8308) 2020-01-23 12:26:46 -08:00
ElenaRepository
d94d50f67d Correct archive when date changed (#8306) 2020-01-16 13:12:11 -08:00
Sébastien Ros
bb8348626b Using Markdig (#8299)
Removes usage of regular expressions to convert markdown.
2019-12-12 12:07:44 -08:00
Matteo Piovanelli
abfe7a022e caching sitecultureselector and sslsettingspart (#8289) 2019-12-05 12:10:18 -08:00
Matteo Piovanelli
104d18aa06 ReCaptchaPartDriver always returns a shape (#8292)
* We changed when ReCaptchaPartDriver verifies whether it's being executed on the Admin side, moving the test from the driver's execution to the shape's, so that the ShapeType is available to other features and services that process the driver's output (e.g. for placement)

* store the first validation of recaptcha to avoid failing if the driver runs again in a single request
2019-12-05 12:06:53 -08:00
ElenaRepository
a67b3cfa00 Fix bug field index part handler (#8294) 2019-12-05 12:04:56 -08:00
Andrew Cartwright
70c4541977 Adds field removal to ContentTypeStep (#8282) 2019-10-31 12:05:39 -07:00
Andrew Cartwright
a0a1d1037e Adds RemovePartFromContentTypeStep for deltas (#8280) 2019-10-17 12:16:54 -07:00
Lombiq
026f81fd16 Core/Contents: ContentsHandler now initializes the DisplayText to the content item's ContentType 2019-09-05 22:30:33 +02:00
Lombiq
7d2dd28404 Lists: Code styling and fixing punctuation in T-strings in AdminController 2019-08-30 13:22:29 +02:00
Pablo Sanchez
a55cb430e2 Modules: Adding styling to Recipe description display to keep line breaks
Taken from https://github.com/OrchardCMS/Orchard/pull/7940
2019-08-30 11:22:42 +02:00
Lombiq
ac60046468 Framework/UI/Resources: ResourceDefinition.CdnSupportsSsl is now obsolete
Discussion: https://github.com/OrchardCMS/Orchard/issues/6941
2019-08-29 23:20:20 +02:00
LorenzoFrediani-Laser
e8f22a472c Null check on method (#8271)
#8270
2019-08-29 12:21:45 -07:00
Lombiq
66480eb6b1 Modules: Code styling and Recipe name display fix in Recipe listing 2019-08-28 19:40:41 +02:00
Lombiq
cf821e1fdc ContentTypes: Updating the "Creatable" content type setting's hint to be more descriptive 2019-08-28 19:09:58 +02:00
Lombiq
c98e289023 ContentTypes: Fixing that type listing should show "LIst Items" link if the type is Listable (instead of Creatable) 2019-08-28 19:06:12 +02:00
Lombiq
3d8bb6d460 ContentTypes: Fixing previous breaking change in validation when editing the display name of a type and a field 2019-08-27 22:50:56 +02:00
Lombiq
f46be479a3 ContentTypes: Fixing that a validation error when adding the first field to a type breaks fields for that type, fixes #6310 #6588 2019-08-27 22:25:34 +02:00
Lombiq
c8f5fd731e ContentTypes: Fixing and DRYing Type/Part/Field display and technical name validation, code styling, fixes #906 #7770 2019-08-27 19:52:14 +02:00
Lombiq
142ef2b458 ContentTypes: Code styling and page title standardization (with encoding fix) in Admin templates 2019-08-27 19:42:02 +02:00
Lombiq
b018234e39 ContentTypes: Removing commented out ViewModel class 2019-08-27 19:40:54 +02:00
Another Developer
78420a02ac Users: Making the notification for RequestLostPassword a bit more user-friendly (#7061), fixes #7070 2019-08-25 17:17:20 +02:00
Lombiq
83ba470cd2 Roles: Fixing and DRYing IsInRoleActivity and RoleCondition to be able handle "Anonymous" and "Authenticated" + code styling, fixes #6948 2019-08-23 19:04:09 +02:00
Lombiq
bbd0d9bb16 Localization: Code styling in LocalizationService 2019-08-23 13:45:08 +02:00
Alex Petryakov
093be0ba77 Localization: Fixing that LocalizationService.GetLocalizedContentItem should find translations within the group (#6931) 2019-08-23 13:35:07 +02:00
Sergio Navarro
0cd7409a0f Projections: Removing length limitation from PropertyEditViewModel.RewriteText
This change is a modified version of PR #6923 according to the discussion there.
https://github.com/OrchardCMS/Orchard/pull/6923
2019-08-23 12:24:14 +02:00
Lombiq
efde9e6d4d Core/Navigation and Layouts: Fixing grammar in MenuWidgetPart editor and Menu Element editor templates 2019-08-23 12:22:14 +02:00
Lombiq
9b9ea88b09 Core/Navigation: Untabifying and code styling in MenuWidgetPart editor template 2019-08-23 12:20:47 +02:00
Lombiq
86b2495858 DynamicForms: Code styling in TaxonomyElementDriver 2019-08-22 20:32:06 +02:00
Sergio Navarro
3ad43bcf3f DynamicForms: Importing and Exporting a TaxonomyElement now uses Identity (#6828), fixes #6821 2019-08-22 20:23:33 +02:00
Lombiq
c34c00ef49 Fixing "Valitator" typos 2019-08-22 20:14:54 +02:00
Lombiq
039335f79d DynamicForms: Deleting ValidationElementDriver (commented out) 2019-08-22 20:11:29 +02:00
Jack Cheng
a3e9bef3ca Media Library: Fixing that renaming files to a reserved Windows name should cause an error, fixes #6802 (#6919) 2019-08-22 19:39:09 +02:00
Lombiq
0279b1e79e DynamicForms: Adding FormSubmission.FormName token
Contrib by Pablo Sanchez (https://github.com/psp589)
2019-08-22 19:21:06 +02:00
Lombiq
8c5d3b6fc7 Framework/Resources: Fixing ResourceManager code styling and failing ResourceManagerTests
PR #8177 (fix for #8176) added new dependencies to ResourceManager, whose stubs need to be registered for unit tests.
2019-08-19 12:59:53 +02:00
DiegoMarguerettaz-Laser
04ae8096de Add Token for Request Header (#8263) 2019-08-15 12:20:30 -07:00
LorenzoFrediani-Laser
6c7390a073 Change returnurl from abosuleurl to relaviveurl (#8265) 2019-08-15 12:17:19 -07:00
Lombiq
dce04a2587 Localization: ContextHelpers.IsRequestAdmin refactored to AdminFilter static method 2019-08-13 20:30:42 +02:00
Lombiq
a808fdbb6b ContentTypes: Removing punctuation from the permissions' description to match other permissions 2019-08-13 18:41:06 +02:00
Lombiq
a7b0e33a43 AuditTrail: Fixing notification messages in RecycleBinController regarding the necessary permissions 2019-08-13 18:37:52 +02:00
Lombiq
b03d83473f Localization: Code styling in FrontEndCultureSelector, displaying culture name instead of code in AdminCultureSelector 2019-08-13 16:25:07 +02:00
Lombiq
eba6f118dd TheAdmin: Code styling in AdminCultureSelector override 2019-08-13 16:17:10 +02:00
Lombiq
9ce774efa5 Framework: Marking the Permissions.RequiresOwnership property obsolete 2019-08-13 15:25:49 +02:00
MarcoViglione-Laser
ec9673a1ca Modified CreateRouteValues when no blog Id is specified to avoid creation of orphaned posts (#8255) 2019-08-01 12:05:42 -07:00
MarcoViglione-Laser
b6a4ef609d Use CreateRouteValues for creation routes (#8241)
Fixes #8238
2019-07-25 12:10:34 -07:00
GiuseppeMusso-Laser
8ca5351872 Fixed media deletion (#8240)
Fixes #8239
2019-07-18 21:22:31 +02:00
MarcoViglione-Laser
a5b2c3d53f Added "Options.SelectedCulture" to RouteData (#8244)
Fixes #8243
2019-07-18 21:09:46 +02:00
MarcoViglione-Laser
927e04b4ad Allows selected contents to not be lost after changing page (#8248)
Fixes #8247
2019-07-18 21:07:15 +02:00
Hermes Sbicego
96ffefd078 Placement's path condition now strips the Tenant/Site UrlPrefix (#8222)
Fixes #6962
2019-07-11 21:09:13 +02:00
Hermes Sbicego
bb87e47bc3 Contents: Adding redirects to overridden routes in AdminController and ItemController (#8224) 2019-07-11 21:08:39 +02:00
DiegoMarguerettaz-Laser
02ff859cf4 Add return url when clicking on a content hosted into a contentpicker field. (#8234) 2019-07-04 20:58:06 +02:00
Matteo Piovanelli
4eba79c66e Added a filter for projections over StringFields (#8213) 2019-05-30 12:08:54 -07:00
eszterkoczak
cfa335a8cf Autoroute migrations: Consolidate UpdateFrom4 changes into Create (#8217), fixes #8198
Lombiq Technologies: ORCH-196
2019-05-26 13:53:07 +02:00
eszterkoczak
26e7a4d251 Adding indices to CommonPart(Version)Record tables (#8210), fixes #8196
Lombiq Technologies: ORCH-193
2019-05-26 13:05:12 +02:00
Lombiq
30fa9458a0 Media Library: "Select All" visibility bound to having at least one item 2019-05-23 18:06:37 +02:00
Lombiq
03c24d8cc7 Media Library: Updating "Select All" logic to also be able to "Select None" depending on whether every item is selected or not 2019-05-23 17:57:39 +02:00
Lombiq
9cafbb82c6 Media Library: Code styling in media-library.js 2019-05-23 17:55:22 +02:00
MobesE46
40e56c5dd9 Media Library: Add button to select all items, fixes #6518 (#6610) 2019-05-23 17:52:38 +02:00
Lombiq
367d2d7d66 Packaging: Code styling in PackageInstaller and PackageManager 2019-05-23 14:13:16 +02:00
Geert Doornbos
f692fc36a9 Packaging: Fixing that trying to install a package that doesn't exist should display a relevant error notification, fixes #6533 2019-05-23 14:10:43 +02:00
Lombiq
759f50c5c0 Unifying Web.config assembly references to Orchard.Framework and Orchard.Core 2019-05-21 17:05:33 +02:00
Lombiq
91dfb8880b Projections: Moving QueryVersionScopeOptions to the Models folder, code styling 2019-05-21 16:30:40 +02:00
Matteo Piovanelli
e19d835e5a DefaultContentManager performance upgrade (#8207) 2019-05-16 12:15:44 -07:00
Matteo Piovanelli
258a490536 fix NRE in DefaultHQLQuery (#8184)
In the InSubquery method Criterion was not being set. This caused NRE when processing a WHERE predicate that used that method.
2019-04-18 12:10:53 -07:00
Hermes Sbicego
c7f9cddb76 Fixes #8181: Prevent placement info loss (#8182)
Fixes #8181
2019-04-18 12:09:04 -07:00
Lombiq
9beedf8b19 Projections: Fixing NRE in FieldTypeEditors when the Query doesn't have its VersionScope configured 2019-04-09 18:29:46 +02:00
Hermes Sbicego
a02323572d Style.Include and Script.Include register the wrong resource key in debug mode (#8177)
Fixes #8176
2019-04-04 12:11:03 -07:00
Lombiq
cb0011c307 Users: Fixing that registration-related actions should always be accessible (#8166) 2019-03-09 23:07:12 +01:00
Lombiq
ba722cf618 Users: Code styling and removing outdated comment from AccountController 2019-03-09 22:58:20 +01:00
GiuseppeMusso-Laser
a53d30dd6a Subquery improvement for HqlExpressions (#8163) 2019-02-28 12:21:49 -08:00
Lombiq
3c4de528c4 Orchard.proj: Fixing that BuildViews should be able to run without running Compile first 2019-02-28 17:46:45 +01:00
Lombiq
5c21b72793 Removing unnecessary step from BuildViews target (Orchard.proj) and removing debug build step from Orchard.Web.csproj 2019-02-27 21:12:07 +01:00
Lombiq
39894eb1fb Updating the CopyRoslynFilesToOutputFolder build target in Orchard.Web.csproj
to make sure that the exact version used for Dynamic Compilation is found, even if there are multiple different versions restored
2019-02-27 19:56:41 +01:00
Lombiq
8a44db7439 CodeGeneration: Updating website protocol to HTTPS in extension manifest templates 2019-02-27 15:45:27 +01:00
Lombiq
b912594699 CodeGeneration: Fixing that the csproj template was referencing DotNetCompilerPlatform in the wrong folder 2019-02-27 15:43:47 +01:00
Lombiq
38130f427b Updating Docs links in Readme to use HTTPS 2019-02-25 14:49:51 +01:00
Lombiq
2ee16e1cb7 Orchard.proj: Fixing that Profiling-Setup should be able to start Orchard.exe with spaces in its path 2019-02-21 01:24:17 +01:00
Lombiq
f1bb89310c Orchard.Pages: Fixing that the "create page" shouldn't promote a page to home page unless it's also published
This prevents SQL timeout and not having a home page content item
2019-02-21 01:23:39 +01:00
Lombiq
c77f4f3cf1 Fixing Workflow Activity templates affected by a breaking change in OutcomeSerializerExtensions
(cherry picked from commit 4b3c67dc5e)
2019-02-20 23:38:41 +01:00
Lombiq
3404e0fe1b Implementing obsolete Media Profiles image cleanup in AzureBlobStorageProvider too
Same logic as 999ecd0786
2019-02-20 18:23:50 +01:00
Lombiq
056233c9c5 Optimizing FileSystemStorageProvider.ListProfiles 2019-02-20 18:12:00 +01:00
Lombiq
5d74f4380c Adding connection string for the Azure Storage Emulator to Orchard.Web/Web.config 2019-02-20 16:34:32 +01:00
Lombiq
dd787a1d10 Fixing that FileSystemStorageProvider.ListProfiles changes can cause NRE in DeleteFile and cause test failure
in CreateFileAndDeleteFileTakesAnySlash if the "_Profiles" folder doesn't exist
2019-02-20 16:18:37 +01:00
Lombiq
992e79de36 Bumping version number to 1.10.3 2019-02-19 21:00:04 +01:00
Lombiq
6bce539675 Farewell, CodePlex! (Press F to Pay Respects) 2019-02-19 20:42:13 +01:00
Lombiq
824e2992a6 Readme cleanup (#8148) 2019-02-19 20:17:47 +01:00
LorenzoFrediani-Laser
999ecd0786 Delete obsolete profile images (#8157)
Fixes ##8156

Delete profiles media's files when deleting media's files.
Delete empty profiles folder.
2019-01-31 12:17:11 -08:00
MarcoViglione-Laser
9321082d44 Alias removal is now executed on the published version of a content (#8100) (#8150) 2019-01-10 12:06:51 -08:00
LorenzoFrediani-Laser
8826c4cdee Issue 8151 implementation (#8153)
Localization Summary admin must authorize for CreateContent permission to a specific contentitem and not a generic PublishContent permission
2019-01-10 12:05:58 -08:00
Lombiq
efcf028696 Orchard.Layouts: Restoring backwards-compatibility with Snippets that don't have a separate manifest 2018-12-18 15:07:04 +01:00
Lombiq
c91bd63fca Orchard.Layouts: Simplifying Snippet Manifest parsing (#8149) 2018-12-18 13:02:51 +01:00
Lombiq
bb8e109582 Orchard.Layouts: Upgrading YamlDotNet to 5.3.0 and dynamic Snippet Manifest parsing replaced with static typing (#8149) 2018-12-17 21:30:26 +01:00
Lombiq
998946ba00 Orchard.Layouts: Fixing code styling in ElementSessionState and removing ElementInstance 2018-12-17 19:06:55 +01:00
Lombiq
1d3e9a523f Removing YamlDotNet package from Orchard.Framework as it's not used 2018-12-04 22:22:34 +01:00
Lombiq
f3be1504df Updating DotNetZip (Ionic.Zip) package to 1.12 2018-12-03 16:15:53 +01:00
Lombiq
3e77690465 Updating Microsoft.Data.* and System.Spatial packages to latest (5.8.4) version 2018-12-03 15:37:27 +01:00
Benedek Farkas
ff20581899 Sebros/fixes (#8141)
* Encoding translated user inputs

* Ensure the media whitelist is enforced
2018-12-03 14:17:10 +01:00
Sébastien Ros
bb6c8ed624 Fixing NRE in DefaultTagCache (#8135) 2018-11-06 09:17:22 -08:00
Lombiq
3c3f58fb3c Localization: Fixing that translated day and month names should be split along space characters as well (#7726)
https://github.com/OrchardCMS/Orchard/issues/7726#issuecomment-425499175
2018-10-08 23:21:01 +02:00
Lombiq
3644d868ec Localization: Fixing that LocalizationDateTimeFormatProvider should be less sensitive to the formatting of the translated strings (#7738) 2018-09-28 18:03:11 +02:00
Lombiq
e527272013 Orchard.Forms: Adding Numberbox (input type="number") shape to EditorShapes 2018-09-28 16:41:37 +02:00
Lombiq
1d22f27bf0 Orchard.Forms: Fixing that local variable name in the Textarea shape did not reflect its content 2018-09-28 16:25:18 +02:00
Benedek Farkas
c3b11fca44 Upgrading TinyMCE to latest version (#8118) 2018-09-27 12:06:00 -07:00
Lombiq
61989d92d4 Framework: Code styling and simplification in GroupInfo.cs and StringExtensions.cs 2018-09-25 18:59:59 +02:00
Lombiq
55485cb465 Framework: Fixing that TemplateFilterForPart should be able to identify an editor group name with spaces (#7683) 2018-09-25 18:58:28 +02:00
Lombiq
cd301e0f94 Orchard.Web/Web.config: Restoring that certain compiler warnings should be ignored during Dynamic Compilation
1659 is not re-added, because it's not used anymore
2018-09-21 13:29:45 +02:00
Lombiq
d202598953 Orchard.Projections: Fixing build warning in MemberBindingsStep
The change in the previous commit (b497f80dd7) is required for this to work
2018-09-19 22:48:18 +02:00
Lombiq
b497f80dd7 Orchard.Recipes: Fixing that RecipeExecutionLogger should be able to handle messages without arguments 2018-09-19 22:45:34 +02:00
Lombiq
1a1470c77a Orchard.Dashboards: Fixing build warning in Debug mode
This change also makes the value of that configuration the same as other modules
2018-09-19 22:44:26 +02:00
Lombiq
f31e6aa60d Upgrading DotNetCompilerPlatform package from 2.0.0 to 2.0.1
This update includes version 2.9.0 of the Roslyn package (improved C# 7.3 compilation)
2018-09-19 20:59:06 +02:00
Lombiq
65f78c3d8d Orchard.Layouts: Fixing potential NRE in ContentPartDisplay (fixes #8110) 2018-09-19 19:27:48 +02:00
Benedek Farkas
be802146bc Dynamic C# Compilation, Static and Dynamic Razor Compilation with Roslyn (1.10.x) (#7713) 2018-09-19 13:45:23 +02:00
Benedek Farkas
fab98c5adb Projections: Updating QueryVersionScopeOptions and ProjectionManager to support Draft-only Queries (#8111) 2018-09-13 22:41:10 +02:00
Lombiq
c68bb8bf77 Adding .editorconfig for Visual Studio 2017 (and above)
https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options
2018-09-13 18:56:10 +02:00
Hermes Sbicego
9a308335bf Editor placement on admin only 2018-08-09 12:15:05 -07:00
Hermes Sbicego
d44120ff3a Fixes #8090 - Weird ManageMenu Permissions (#8092) 2018-08-09 12:10:55 -07:00
Jay Harris
79aacf86b8 Update validation RegEx for email to latest spec (#8085) 2018-08-02 12:26:53 -07:00
Jay Harris
aa9276d9f0 Remove duplicate json.net assembly binding (#8086)
Fixes #7931
2018-08-02 12:19:42 -07:00
Mohammad Dameer
cc4be02dd1 Prevent the usage of "null" as tenant name (#8058) 2018-05-31 12:09:14 -07:00
Sipke Schoorstra
d3f4c91d40 Fixing ExclusiveBranchActivity
The ToList call prevents an issue where the foreach body would cause a collection change, whoch would throw a "collection modified" exception.
2018-05-21 12:54:03 +02:00
Matteo Piovanelli
92ca4128e3 Fix List.cshtml with new permission (#8053) 2018-05-17 12:21:59 -07:00
LorenzoFrediani-Laser
4c78799be3 Add javascript event onSelect (#8047)
Fixes #8046
2018-05-11 12:20:46 -07:00
Hermes Sbicego
de52d82955 [8030] Adds "Create content" permission (#8048)
Fixes #8030
2018-05-11 12:19:49 -07:00
Mohammad Dameer
c1522d5b03 Support byte[] column type with new test for generic create command method (#8050) 2018-05-11 12:08:52 -07:00
Matteo Piovanelli
91f0dac7dd Added Configuration to MembershipValidationService (#8029)
Fixes #8003
2018-04-19 12:10:00 -07:00
Lombiq
685f092a22 Adding authorization to widgets displayed from Layouts 2018-04-17 23:49:51 +02:00
Surawout Thepchalerm
25718a3e90 Added PostgreSqlCommandInterpreter (#8010)
Fixes #7942
2018-04-12 13:11:23 -07:00
Matteo Piovanelli
6da6368bcc Removed LocalizationPart (#7911) 2018-04-05 12:24:34 -07:00
Sébastien Ros
e3f010d62b Remove usage of BinaryFormatter for file cache (#8005) 2018-03-29 14:38:54 -07:00
790 changed files with 95808 additions and 3081 deletions

View File

@@ -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
-----

View File

@@ -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="&quot;$(ProfilingFolder)\bin\Orchard.exe&quot; %(ProfilingSetupCommands.Identity)" WorkingDirectory="$(ProfilingFolder)"/>
</Target>
<!-- Gallery Packaging -->

View File

@@ -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 projects 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
View 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
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="./packages" />
</config>
</configuration>

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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

View File

@@ -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;

View File

@@ -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");

View File

@@ -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;

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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>!"

View File

@@ -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

View File

@@ -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>"

View File

@@ -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.

View File

@@ -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);
}
}
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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" />

View File

@@ -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

View File

@@ -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"));

View File

@@ -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));

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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();

View File

@@ -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>

View File

@@ -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]

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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>

View File

@@ -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;
}
}
}

View File

@@ -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

View File

@@ -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

View File

@@ -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)));
}
});
}

View File

@@ -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) {

View File

@@ -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;
}
}
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -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"},

View File

@@ -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

View File

@@ -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",

View File

@@ -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>
}
}

View File

@@ -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)
}

View File

@@ -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">

View File

@@ -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(" | ")
}

View File

@@ -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(" | ")
}
}

View File

@@ -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

View File

@@ -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

View File

@@ -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 } }));
}
}
}

View File

@@ -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) {

View File

@@ -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}
};
}
}
}

View File

@@ -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

View 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)
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>
}

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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

View File

@@ -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

View File

@@ -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) {

View File

@@ -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

View File

@@ -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();

View File

@@ -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

View File

@@ -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

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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")]

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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

View File

@@ -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")]

View File

@@ -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);
}
}
}
}

View File

@@ -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>

View File

@@ -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>

View File

@@ -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) {

View File

@@ -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

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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>

View File

@@ -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>

View File

@@ -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 {
}
}
}
}
}

View File

@@ -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