Compare commits

...

340 Commits

Author SHA1 Message Date
Sebastiaan Janssen 64dac39bae Merge branch 'temp-U4-7220' into dev-v7 2015-12-01 10:35:38 +01:00
Sebastiaan Janssen 6040d149ec Merge branch 'dev-v7' into temp-U4-7220 2015-12-01 09:57:44 +01:00
Claus bfbc6595fb Fixed a few more split separators. 2015-11-30 19:29:23 +01:00
Claus 25d8fc7a13 Fixing split separator for thumbnailSizes in FileUploadPropertyValueEditor. 2015-11-30 19:18:57 +01:00
Claus e11b5c3fdb Fixes: U4-7220 Upgrading 4.9.0 to 7.3.0 fails due to missing UniqueID field on cmsPropertyType table
Migration happening in 6.0.2 failing due to use of a PropertyTypeDto type where we have added UniqueId in 7.3.0.
2015-11-30 18:13:51 +01:00
Shannon 87100feb3d Fixes: U4-7467 Umbraco 7.3.2 Clean install, OWIN error after database creation and bumps version 2015-11-27 21:23:24 +01:00
Shannon Deminick eae74b0e20 Merge pull request #931 from lars-erik/fix-u4-7329
Actually save the domain
2015-11-27 16:56:07 +01:00
Shannon 610efe552d Bumps version 2015-11-27 16:54:02 +01:00
Shannon c4860a490f Ensures that GetUserSecondsMiddleWare uses the SystemClock for UTC Now, ensures that it only extends the ticket when necessary and not everytime this middleware is called - the same logic that OWIN normally renews tickets with, this means the cookie is not written everytime this request is made. 2015-11-27 16:43:02 +01:00
Shannon 8e6bbc3df9 Ensures that written cookies are done so consistently based on the UmbracoBackOfficeCookieAuthOptions. Ensures that when a webforms page requests token renewal that the token is not always renewed for the request, it checks if the tokens expiry correctly and only renews when necessary so the cookie is not written each time. Fixes the ForceRenewalCookieAuthenticationHandler to only write a cookie if the request is for a request that is not normally auth'd (i.e. is a webforms form that exists outside the normal /umbraco path ... legacy). 2015-11-27 16:25:39 +01:00
Lars-Erik Aabech c16d0b77c2 Actually save the domain 2015-11-27 12:59:15 +01:00
Sebastiaan Janssen 2c4403f892 Fixes image that was missing from the build 2015-11-26 13:08:59 +01:00
Shannon fd66f08520 Fixes setting auth cookie during install, removes some try/catch/swallow with some error messaging, converts some String -> string and == false updates. 2015-11-26 13:07:22 +01:00
Shannon 8e50f4968f Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-11-26 12:02:17 +01:00
Shannon 9acbe09449 fixes the tmh dynamic local version, the bower version the build server runs has an issue! 2015-11-26 12:02:08 +01:00
Sebastiaan Janssen 4baaafd006 Also remove change password dashboard from nuget package 2015-11-26 11:57:37 +01:00
Shannon 3f7293304d removes password change dashboard from release 2015-11-26 11:55:42 +01:00
Shannon f62581bd38 reverts more of the caps lock 2015-11-26 11:39:49 +01:00
Shannon 9782e3711e Revert "Update bower.json with ngCapsLock"
This reverts commit f0e1460550.

Conflicts:
	src/Umbraco.Web.UI.Client/bower.json
2015-11-26 10:54:43 +01:00
Shannon 1f4ba9cfdc ignores file that shouldn't be there 2015-11-26 10:36:15 +01:00
Shannon ba4f0cc6a4 remove file that shouldn't be checked in 2015-11-26 10:35:28 +01:00
Shannon fc84821e8b fixes U4-6340 Partial view macro with parameters not working in RTE - to use a Model to post with the same Action name 2015-11-26 10:32:43 +01:00
Shannon Deminick 0fcf0b505a Merge pull request #922 from engern/U4-6340
Fixes U4-6340 : Partial view macro with parameters not working in RTE and Grid (backend)
2015-11-26 09:54:24 +01:00
Shannon d300146cf6 trips content/media names, makes sure that the content type editor when rendering template names html encodes the names. 2015-11-25 20:44:53 +01:00
Shannon c8482b9f59 Revert "Merge pull request #875 from Phosworks/U4-7312"
This reverts commit 14265fc964, reversing
changes made to 18c3345e47.

Conflicts:
	src/Umbraco.Web.UI.Client/src/views/propertyeditors/fileupload/fileupload.controller.js
	src/Umbraco.Web/Editors/ImagesController.cs
2015-11-25 20:27:58 +01:00
Shannon b7795e19ef Changes bigthumbnail pr to not cache per second, just minute 2015-11-25 20:21:24 +01:00
Shannon c97617f5b5 Fixes: U4-7461 xss vulnerability in content type editor 2015-11-25 20:15:28 +01:00
Shannon Deminick 14265fc964 Merge pull request #875 from Phosworks/U4-7312
Changed web api GetBigThumbnail to image processor
2015-11-25 19:52:14 +01:00
Shannon 18c3345e47 Fixes U4-7459 XSRF protection bypass - ensures tokens are checked for the non-editor api controllers 2015-11-25 19:39:24 +01:00
Shannon 924a016ffe Fixes U4-7457 Server side request forgery (xsrf) in feedproxy.aspx 2015-11-25 18:05:57 +01:00
Claus a02b41e9d2 Merge pull request #927 from umbraco/temp-U4-7307
U4-7307 Windows Authentication prompts for Windows login after Umbrac…
2015-11-25 15:22:36 +01:00
Shannon 068c4a0b16 Fixes PR for U4-7362 Add message to login screen if Caps Lock is on 2015-11-25 11:22:12 +01:00
Shannon Deminick f7d28d769a Merge pull request #886 from bjarnef/dev-v7-U4-7362
Add message to login screen if Caps Lock is on
2015-11-25 11:01:47 +01:00
Claus 9a07e206d8 Merge pull request #874 from andydale1982/U4-7323_(#871)‏
U4 7323 (#871)‏
2015-11-25 10:51:41 +01:00
Shannon Deminick 0edb71f4aa Merge pull request #917 from bjarnef/dev-v7-move-umb-version-in-dialog
Move Umbraco version label to header in user dialog
2015-11-25 10:51:36 +01:00
Shannon Deminick b376207ef6 Merge pull request #868 from opelpanfan/UKFest-U4-7324
U4-7324 Member Picker search results doesn't show correct icons
2015-11-25 10:33:59 +01:00
Shannon 6d0aa824ad U4-7307 Windows Authentication prompts for Windows login after Umbraco login 2015-11-24 16:31:18 +01:00
Claus 89afacf161 Merge pull request #915 from umbraco/temp-U4-7380
U4-7380 Backoffice timeouts after 7.3.1  upgrade
2015-11-24 11:35:01 +01:00
Claus 0fa6940bb6 Merge branch 'arknu-U4-6657-mediapicker' into dev-v7 2015-11-24 10:37:11 +01:00
Claus 1353b0a592 Reordering flex properties - recess module crashes with out of memory exception if they are in the other order. 2015-11-24 10:35:54 +01:00
Claus 617fec171f Merge branch 'U4-6657-mediapicker' of git://github.com/arknu/Umbraco-CMS into arknu-U4-6657-mediapicker 2015-11-24 10:33:04 +01:00
Claus 2c63866cb3 Merge pull request #909 from umbraco/U4-7270-1
Creates an IAsyncRenderMvcController which can be used instead of IRe…
2015-11-24 10:09:45 +01:00
Sebastiaan Janssen 18d3aa9ee2 Merge pull request #926 from kiasyn/patch-1
Remove unnecessary ToLowerInvariant call from PreviewMode
2015-11-23 22:17:07 +01:00
kiasyn f83c966e55 Remove unnecessary ToLowerInvariant call from PreviewMode
Text was being set lowercase and then injected with the preview badge markup. This meant that things such as script tags were being lowercased, breaking the javascript.
2015-11-24 10:02:14 +13:00
Tommy Enger de41a1f1ca Clean up the code
DRY
2015-11-23 16:29:09 +01:00
Tommy Enger c9f57c6ce3 Split Get and Post
Split Get and Post into 2 separate methods to maintain backwards
compability
2015-11-23 15:52:36 +01:00
engern 54ab26e2ed Simplifying thge code even further
Realized that we don't need to convert the exisitng dictionary to a new
dictionary.
2015-11-21 14:00:58 +01:00
engern 31dc1b2cdb Fixes U46340 2015-11-21 13:20:13 +01:00
Claus d4b9a711c6 Merge pull request #919 from umbraco/temp-U4-4641
Fixes: U4-4641 Feature Request:  template and code editors should have insert Section, Define section buttons
2015-11-20 13:41:50 +01:00
Claus 9521742254 Fixes to MultiNodePicker when using media. 2015-11-20 13:17:28 +01:00
Claus 9fee3f5873 Merge pull request #918 from umbraco/temp-U4-5764
Related to: U4-5764 - adding in Open button on content/media picker
2015-11-20 12:09:21 +01:00
Claus cb10578e19 Merge branch 'Nicholas-Westby-feature/U4-5764-node-picker-info' into temp-U4-5764 2015-11-20 11:52:25 +01:00
Claus cdc4435f2d Merge branch 'feature/U4-5764-node-picker-info' of git://github.com/Nicholas-Westby/Umbraco-CMS into Nicholas-Westby-feature/U4-5764-node-picker-info 2015-11-20 11:47:48 +01:00
bjarnef a885840b9f Move Umbraco version label to header in user dialog 2015-11-19 21:55:54 +01:00
bjarnef 62173cef58 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-19 21:12:24 +01:00
Shannon Deminick e5b0a4d98c Merge pull request #854 from Spijkerboer/UKFest-U4-7322
Uk fest u4 7322
2015-11-19 19:26:53 +01:00
Shannon Deminick 9479d63cba Merge pull request #899 from Acentrage/U4-7219
Fixes U4-7219
2015-11-19 19:24:24 +01:00
Shannon 4c544acb42 fixes links so that working with vdirs works too. 2015-11-19 19:21:55 +01:00
Shannon Deminick c7c5f481f1 Merge pull request #879 from danieland/U4-4794--nodebug
U4 4794  nodebug
2015-11-19 19:10:35 +01:00
Shannon 5e8e62cbf7 missing csproj save 2015-11-19 18:29:11 +01:00
Shannon 555b520a0c Cleans up the usages of auth cookies. OWIN is in charge of auth cookies but because we have Webforms, WebApi, MVC and OWIN, they all like to deal with cookies differently. OWIN should still be solely in charge of the auth cookies, so the auth extensions are cleaned up, the renewal now works by queuing the renewal and we have custom middleware detect if a force renewal has been queued and we renew the auth cookie there. Have obsoleted a few methods that should not be used that write auth tickets directly (this is purely for backwards compat with webforms). All of these changes now ensure that the auth cookie is renewed consistently between Webforms, WebApi, MVC and OWIN. Some changes also include ensuring that OWIN is used to sign out. 2015-11-19 18:12:21 +01:00
Simon Busborg 8053db32b6 code comments 2015-11-19 15:40:38 +01:00
Sebastiaan Janssen 3e2d59e526 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-11-19 14:43:45 +01:00
Sebastiaan Janssen 9d3e967c2a Ignore test that keeps crapping out on build server 2015-11-19 14:43:35 +01:00
Shannon 71ec09486d Reverts the 'fix' from U4-7118 since it is incorrect. Updates the sliding expiration of the cookie/ticket when the user is supposed to be always logged in to 30 minutes in case the timeout is actually set very low in config. 2015-11-19 14:17:06 +01:00
Claus 8dadc92aa8 Fixed migration causing issues when upgrading from a site pre-migrations-table to version 7.3.2. 2015-11-19 12:01:46 +01:00
Shannon f472f5d950 Ensures that OWIN signout method is called - this ensures that any auth middleware configured for the current user is called for sign out. Updates our cookie middleware provider to also ensure that our custom cookies are cleared when signing out with OWIN. 2015-11-19 11:57:24 +01:00
Simon Busborg 775a6f80ea Added comments to support the changes 2015-11-19 11:47:49 +01:00
Simon Busborg 5bf8b8ecba Used less function 'fade' instead of random color 2015-11-19 11:44:33 +01:00
Simon Busborg 397ef32665 Added hover & active state to input-label--small 2015-11-19 11:40:29 +01:00
Simon Busborg 2634e33f51 Used @fontSizeLarge variable to determine font-size for panel-dialog--header 2015-11-19 11:27:56 +01:00
Simon Busborg 6e27caa547 Added comments and notes 2015-11-19 11:11:09 +01:00
Simon Busborg 9c027dcdbc some ui love for the panel dialogs 2015-11-19 10:32:17 +01:00
bjarnef f3876b86dc Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-19 00:38:32 +01:00
Shannon Deminick 58c3dfac1c Merge pull request #913 from Nicholas-Westby/feature/u4-7425-forms-constant-comment
Fixed typo for "forms": http://issues.umbraco.org/issue/U4-7425
2015-11-19 00:34:54 +01:00
Nicholas-Westby dcf59d2b17 Fixed typo for "forms": http://issues.umbraco.org/issue/U4-7425 2015-11-18 14:29:10 -08:00
bjarnef 71099514cb Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-18 22:00:33 +01:00
Sebastiaan Janssen 887111318f Update install facts 2015-11-18 20:35:36 +01:00
Sebastiaan Janssen bf9755b27c Don't end response so people can actually hook into PostRequestHandlerExecute 2015-11-18 19:41:20 +01:00
Sebastiaan Janssen aca181b32e U4-7410 Version issue with MySql.Data after upgrade to 7.3.1.
#U4-7410 Fixed
2015-11-18 19:39:10 +01:00
Shannon Deminick 886347e763 Merge pull request #912 from lars-erik/fix-u4-7268
Support generic CultureInfo as language culture
2015-11-18 18:26:09 +01:00
Shannon Deminick 9fa606e065 Merge pull request #907 from umbraco/temp-U4-7414
U4-7414 Deleted tab's properties should become generic properties
2015-11-18 17:01:02 +01:00
Shannon e40ac44afd updates test to reflect the instructions to replicate the original issue U4-7414 2015-11-18 17:00:27 +01:00
Shannon 48603fb840 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-11-18 16:07:10 +01:00
Shannon f824439180 Merge branch 'UKFest-U4-4792' of https://github.com/opelpanfan/Umbraco-CMS into opelpanfan-UKFest-U4-4792
Conflicts:
	src/Umbraco.Core/Services/ContentService.cs
2015-11-18 16:07:01 +01:00
Shannon Deminick b3616c9f8c Merge pull request #911 from umbraco/temp-U4-4792
Fixes: U4-4792 Ancestors() on IContent throws "Object reference not set to an instance of an object."
2015-11-18 16:04:22 +01:00
Shannon 48383f2e7a updaes null check and ensures the path isn't pre-set in the withidentity overload 2015-11-18 16:04:01 +01:00
Shannon cb98385242 updates content/media service methods - null checks for parent IContent, dosn't use Parent() syntactic sugar methods, removes path creation in the WithIdentity methods. 2015-11-18 15:52:32 +01:00
Shannon 916bad82df Ensures that the RenderActionInvoker isn't doing anything special so that MVC takes care of everything regarding async vs non-async and any controller descriptor/action descriptor lookups and cache. Creates a RenderIndexActionSelectorAttribute - this is used to decorate the underlying RenderMvcController.Index action. MVC will call into this method to check if the MethodInfo is valid, we then do a quick comparison of types, if the current type is the same as the reflected type, this means that the Index action has been overridden or there is no custom controller... lets use it. If the types don't match we'll do a simple reflected lookup to check if the reflected controller type (current controller) has more than one index action, if so, it means that a custom controller is in play and it has a custom index action... so we won't use the base class action and then it's up to MVC to find any other matching Index action based on the current request parameters. Added some tests for this too. 2015-11-18 14:59:29 +01:00
Claus 29ec8cb2d3 Merge pull request #857 from gerwinbouwhuis/UKFest-U4-5581
Uk fest u4 5581
2015-11-18 14:32:52 +01:00
Lars-Erik Aabech 04900337c7 Support generic CultureInfo as language culture 2015-11-18 14:13:32 +01:00
Claus 1433685160 MediaService assigns Path when creating media objects. 2015-11-18 09:26:45 +01:00
Stephan c5994ed54a Fix previous commit 2015-11-17 17:25:01 +01:00
Shannon 9fd80d791a Creates an IAsyncRenderMvcController which can be used instead of IRenderMvcController if developers want access to an async Index action. 2015-11-17 17:05:00 +01:00
Stephan f5f9cb676c Fix CultureInfo leak in UmbracoApplicationBase too. 2015-11-17 16:54:24 +01:00
Claus 04e2d2370a Fixes: U4-4792 Ancestors() on IContent throws "Object reference not set to an instance of an object." 2015-11-17 16:49:01 +01:00
Stephan 8d00d931b0 U4-7414 Deleted tab's properties should become generic properties 2015-11-17 16:36:57 +01:00
Shannon Deminick 2998ad8cea Merge pull request #873 from AffinityID/u4-7352
U4-7352 Fixed exception logging in UmbracoDatabase.
2015-11-17 16:21:18 +01:00
Shannon Deminick 46c15ef28f Merge pull request #877 from cheeseytoastie/UKFest-7341
Ukfest 7341
2015-11-17 16:19:35 +01:00
Claus 2b369a57d8 Merge pull request #864 from andycyberian/UKFest-U4-6980
Uk fest u4 6980
2015-11-17 14:25:38 +01:00
Claus c37a6bb928 Merge pull request #870 from JJCLane/UKFest-U4-6094
Adds a check to include users in the send to translation list that ha…
2015-11-17 13:48:01 +01:00
Claus 6e53291877 Fixed up a few things. 2015-11-17 13:42:00 +01:00
Claus bb78f756c7 Merge branch 'Jeavon-U4-4641' into temp-U4-4641 2015-11-17 12:47:18 +01:00
Claus ffb0de4050 Merge branch 'U4-4641' of git://github.com/Jeavon/Umbraco-CMS into Jeavon-U4-4641 2015-11-17 12:46:24 +01:00
Claus 0fecad9867 Merge pull request #906 from umbraco/temp-U4-6515
Fixes: U4-6515 Media picker does not set $dirty
2015-11-17 11:51:58 +01:00
Claus 3045068d68 Fixes: U4-6515 Media picker does not set $dirty
Included fix for member picker.
2015-11-17 10:59:21 +01:00
Claus 37a6668313 Merge branch 'U4-6515' of git://github.com/deepak4u/Umbraco-CMS into deepak4u-U4-6515 2015-11-17 10:50:07 +01:00
Sebastiaan Janssen 36814d746f Merge pull request #905 from GertyEngrie/dev-v7
U4-7297 - fixes <hr/>-button in tinymce
2015-11-17 10:34:37 +01:00
Claus a72f6edb6b Merge pull request #846 from OptimisticCoder/UKFest-U4-6732
U4-6732 - Added message on back office, when JS is disabled.
2015-11-17 10:23:06 +01:00
Sebastiaan Janssen e01cbcd405 Fix failing upgrade due to old dll being in bin folder 2015-11-17 09:24:22 +01:00
Claus 012ed6cf16 Merge pull request #862 from dampee/u4-7314
U4-7314 Change name of "Textbox Multiple" to "TextArea"
2015-11-17 08:57:49 +01:00
Gerty Engrie eb3ff12916 U4-7297 - fixes <hr/>-button 2015-11-17 00:35:10 +01:00
Claus 1ebff69358 Merge pull request #904 from umbraco/temp-U4-7393
Fixes: U4-7393 Actions menu placed behind publish button on mobile phone
2015-11-16 16:02:00 +01:00
Claus 5435c44ea9 Using a lower z-index to fix the issue at hand. 2015-11-16 16:00:43 +01:00
Claus 76fa477c35 Merge branch 'U4-7393' of git://github.com/Acentrage/Umbraco-CMS into Acentrage-U4-7393 2015-11-16 15:55:04 +01:00
Claus 1f6f36d8c8 Updated unit test after adding in TaskTypeMapper. 2015-11-16 15:53:58 +01:00
Claus Jensen c46ac11125 Merge pull request #849 from mzajkowski/UKFest-U4-6282
U4-6282  Add note to Register Partial Macro
2015-11-16 15:37:47 +01:00
Claus 73d5a3f993 Merge branch 'opelpanfan-UKFest-U4-6511' into dev-v7 2015-11-16 15:31:29 +01:00
Claus Jensen 5a99a6903d Merge pull request #888 from umbraco/temp-U4-7353
Fixes: U4-7353 OAuth providers for the back office require more flexi…
2015-11-13 14:47:11 +01:00
Shannon Deminick 775639da41 Merge pull request #848 from Khinrot/UKFest-U4-5560
Fixing "U4-5560 White space issue in content tree"
2015-11-13 14:06:40 +01:00
Shannon Deminick 2375ede161 Merge pull request #867 from jbreuer/U4-4028
U4-4028 Don't load the full images, but server side resized.
2015-11-13 13:41:53 +01:00
Shannon Deminick fcd00599da Merge pull request #858 from tompipe/U4-1959
Fixes U4-1959
2015-11-13 13:40:26 +01:00
Shannon d3f5090150 Fixes up a couple of missing path updates and incorrect icon resolution and fixed another issue with webservice path reference 2015-11-13 13:38:30 +01:00
Shannon 6a7faf457b Merge branch 'dev-uk-U4-1117' of https://github.com/JeffreyPerplex/Umbraco-CMS into JeffreyPerplex-dev-uk-U4-1117 2015-11-13 11:35:29 +01:00
Shannon ec247d2b27 ensures the migration table's seed is higher than 1 (have put it to 100). 2015-11-13 11:31:59 +01:00
Shannon f32479bb10 bumps version 2015-11-13 11:26:31 +01:00
Shannon Deminick 371269436f Merge pull request #891 from umbraco/temp-U4-7128
Fixes: U4-7128 Send to Translation gives YSOD
2015-11-13 10:23:41 +01:00
Claus ef13e4112f Merge branch 'UKFest-U4-6511' of git://github.com/opelpanfan/Umbraco-CMS into opelpanfan-UKFest-U4-6511 2015-11-12 16:40:01 +01:00
Claus Jensen ce5b6861bb Merge pull request #855 from ryanmcdonough/UKFest-U4-5617
UKFest-U4-5617 RTE now respects CSS Directory AppSetting.
2015-11-12 16:35:27 +01:00
Acentrage eaf64d1814 Increased timeout from 200 to 1000 ms so you can actually type something and added support for manually submit with enter without waiting for the timer. 2015-11-12 15:33:49 +01:00
Acentrage 6bf1ecdb11 Fixes U4-7393
Safe to use both for mobile and desktop.
2015-11-12 15:17:27 +01:00
Claus Jensen fdd0ff2c23 Merge pull request #897 from umbraco/temp-U4-7070
Fixes: U4-7070 UX - Mediapicker autofocus when creating a folder
2015-11-12 15:14:19 +01:00
Claus bade8e42ba Fixes to media picker when creating new folders.
Changed to ngShow to ensure input field hides when blur event is hit.
Clearing and switching visibility of input field on successful submit.
Fixed up focus directive to use $timeout. The focus event can trigger before the element is rendered by angular so its safer to have a timeout ensure it is done at the end of the digest cycle - using $timeout instead of setTimeout ensures it is handled by angular at the right time.
2015-11-12 15:12:59 +01:00
Claus cfdf2768e6 Merge branch 'UKFest-U4-7070' of git://github.com/JJCLane/Umbraco-CMS into JJCLane-UKFest-U4-7070 2015-11-12 14:05:10 +01:00
Claus Jensen c3ca006f14 Merge pull request #896 from umbraco/temp-U4-3774
Fixes: U4-3774 Change password UX
2015-11-12 13:36:36 +01:00
Claus 6c47c8f792 Added danish translation. 2015-11-12 13:36:13 +01:00
Claus 63160e2e2d Removing the Change Password tab from Content section. 2015-11-12 13:31:03 +01:00
Claus edc58fe8a5 Merge branch 'dev-uk-U4-3774' of git://github.com/JeffreyPerplex/Umbraco-CMS into JeffreyPerplex-dev-uk-U4-3774 2015-11-12 11:23:36 +01:00
Claus Jensen 23632dc0c3 Merge pull request #856 from tompipe/U7-6928
Fixes U4-6928 - Persist Creator ID of member
2015-11-12 11:07:57 +01:00
Claus Jensen d739b9fb31 Merge pull request #894 from umbraco/temp-U4-6167
Fixes: U4-6167 MNTP: show path of selected node
2015-11-12 10:58:24 +01:00
Claus 2ae4ede258 Showing path when hovering nodes should be configurable on the content picker. 2015-11-12 10:55:00 +01:00
Claus cacd08b57c Merge branch 'tompipe-U4-6167' into temp-U4-6167 2015-11-11 17:21:51 +01:00
Claus 4eddfb4cf5 Merge branch 'U4-6167' of git://github.com/tompipe/Umbraco-CMS into tompipe-U4-6167 2015-11-11 17:13:40 +01:00
Claus f2b3d7c041 Removed commented out line. 2015-11-11 12:07:45 +01:00
Claus 5d97a94dcb Fixed to use alias instead of hardcoded id.
Added mapper for TaskType.
2015-11-11 12:02:12 +01:00
Claus de6e7dd28d Merge branch 'U4-7128' of git://github.com/tompipe/Umbraco-CMS into tompipe-U4-7128 2015-11-11 11:14:38 +01:00
Claus Jensen 420c029bf7 Merge pull request #859 from Khinrot/UKFest-U4-6426
Fixing "U4-6426 CTRL click should open in a new window"
2015-11-11 11:12:22 +01:00
Claus 61441dd436 Fixes: U4-7370 Upgrading from 7.3.1 to 7.4 fails
cherrypicked from 7.4.0 branch.
Added migration for 7.3.2, ensuring the identity on the table is correct. It failed due to rows initially being inserted with identity disabled and therefore the seed of the table was zero even when the table had data.
2015-11-10 12:15:44 +01:00
bjarnef 5c24867925 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-09 23:52:27 +01:00
Wincent 0409cbe613 Changed ImageController.GetBigThumbnail to redirect
Changed thumbnail paths to include rnd equal to UpdateDate
2015-11-09 21:41:25 +01:00
Shannon bbbea99ced removes redundant null check. 2015-11-09 10:56:07 +01:00
Shannon 3d213342bf Fixes: U4-7353 OAuth providers for the back office require more flexibility with Challenge Results 2015-11-09 10:42:15 +01:00
Sebastiaan Janssen 48fdb75d96 Improves clean scripts for Claus 2015-11-09 09:25:59 +01:00
Sebastiaan Janssen a97094458d U4-7356 <siteMap><providers> element can only be added once, when using nuget update-packge
U4-7356 Fixed
2015-11-09 09:25:58 +01:00
Nicholas-Westby f81353af0b Amended last commit for detailed node info (so it plays nice when picking media): http://issues.umbraco.org/issue/U4-5764
Also added node path to title of "Open" button (so it shows the full path on hover).
More consistent quoting (namely, using apostrophes rather than double quotes).
2015-11-08 17:16:17 -08:00
bjarnef f0e1460550 Update bower.json with ngCapsLock 2015-11-09 00:34:34 +01:00
bjarnef d15c09ad2a Localize "Caps Lock is on" 2015-11-09 00:06:16 +01:00
Nicholas-Westby 5813202892 Finished implementation of detailed node info (added breadcrumb to content dialog): http://issues.umbraco.org/issue/U4-5764
Also moved the breadcrumb into a directive since it was used in multiple places.
2015-11-07 23:51:07 -08:00
bjarnef 82f6b6a66d Add ngCapsLock 2015-11-07 23:53:35 +01:00
bjarnef eec6ee79aa Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-11-07 00:25:49 +01:00
Nicholas-Westby 5ed4f262cd Partial implementation of detailed node info (changed button text to "Open" and styled a bit): http://issues.umbraco.org/issue/U4-5764 2015-11-04 22:25:37 -08:00
Nicholas-Westby e5d7f6fd04 Partial implementation of detailed node info (show node in "view" is clicked): http://issues.umbraco.org/issue/U4-5764 2015-11-03 22:39:36 -08:00
Daniel a9ad0ae8eb removed the debug check 2015-11-02 23:34:33 +01:00
Daniel Andreasen 9cd64a9061 Merge pull request #2 from umbraco/dev-v7
merge from umbraco/
2015-11-02 22:41:44 +01:00
Steve Morgan 839c0d011b Added ConfigureAwait(false)
ConfigureAwait(false) is recommended on async calls?
http://blog.stephencleary.com/2012/07/dont-block-on-async-code.html
Credit: @dampeebe
2015-11-02 10:26:25 +00:00
Nicholas-Westby 15c9aadcdc Partial implementation of detailed node info: http://issues.umbraco.org/issue/U4-5764 2015-11-01 22:43:27 -08:00
Wincent 36a1c0a9e0 Changed web api GetBigThumbnail to image processor in mediahelper.service.js and fileupload.controller.js 2015-10-31 16:31:19 +01:00
Stephan 30f0c96052 Fix AsyncLock finalizer throwing exceptions 2015-10-31 12:47:04 +01:00
Stephan cfab30a1ef Fix thread CultureInfo issue breaking PetaPoco 2015-10-31 12:47:03 +01:00
Stephan 1dd0086eb5 Revert "strange/crazy peta poco fix for cultures"
This reverts commit 0d29e1438c.
2015-10-31 12:47:02 +01:00
andydale1982 a7f06ebc56 Typo Correction 2015-10-30 10:38:05 +00:00
Andrey Shchekin 9498bc4bfd U4-7352 Fixed exception logging in UmbracoDatabase. 2015-10-30 11:24:18 +13:00
Jeavon Leopold 38b13bf6ce Basic implementation for U4-4641 2015-10-29 17:18:40 +00:00
Jeavon Leopold c8cb5b26b0 Basic implementation for U4-4641 Feature Request: template and code editors should have insert Section, Define section buttons 2015-10-29 17:14:45 +00:00
andydale1982 5749f80a7f Added instructions to manually install node_modules. 2015-10-29 17:10:39 +00:00
Jordan Lane 5d9a935621 Adds a check to include users in the send to translation list that have the translate permission for current page
http://issues.umbraco.org/issue/U4-6094#
2015-10-29 16:50:00 +00:00
Tom Pipe 1ff4fe26dd Fixes YSOD after send to translation 2015-10-29 16:43:54 +00:00
Benas Brazdziunas bd69820028 Member Picker search results doesn't show correct icons 2015-10-29 16:29:33 +00:00
Jeroen Breuer 3c9953979a U4-4028 Don't load the full images, but server side resized. 2015-10-29 17:00:23 +01:00
andydale1982 2f6189ae24 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-29 15:55:49 +00:00
deepak4u 5ff329778d fix for issue u4-6515 2015-10-29 15:53:11 +00:00
Andy Rose befb2b4d2f U4-6980: Fixing merge issue 2015-10-29 15:32:03 +00:00
Andy Rose f4ae45d8f2 U4-6980: Adding supporting unit tests for changes to the template repository 2015-10-29 15:29:23 +00:00
Andy Rose 7b73ed1796 U4-6980: Adding supporting unit tests for changes to the template repository 2015-10-29 15:29:22 +00:00
Andy Rose 0eacbcb7cb U4-6980: Only assume a masterpage template if a MVC hasn't already been created 2015-10-29 15:29:20 +00:00
Jeffrey Schoemaker f871de61d5 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:28:12 +01:00
Jeffrey Schoemaker e02693e46b U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:27:33 +01:00
Jeffrey Schoemaker db62d14b1a U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:27:05 +01:00
Jeffrey Schoemaker c096ab9e54 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:26:31 +01:00
Jeffrey Schoemaker ada5a031b4 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:26:06 +01:00
Jeffrey Schoemaker 9c8b9f8bb4 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:25:41 +01:00
Jeffrey Schoemaker a4bd3abfbe U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:25:15 +01:00
Jeffrey Schoemaker a8a768a50f U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:24:41 +01:00
Jeffrey Schoemaker 62b99ffc59 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:24:16 +01:00
Jeffrey Schoemaker 6b0c94948e U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:23:30 +01:00
Jeffrey Schoemaker 25f049e167 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:22:39 +01:00
Jeffrey Schoemaker f7979fa19d U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:22:05 +01:00
Jeffrey Schoemaker 6fd1784337 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:21:25 +01:00
Jeffrey Schoemaker a7bb8e0d00 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 16:20:17 +01:00
Jeffrey Schoemaker ed4a9f84f0 U4-1117 - Fixed any errors when renaming /umbraco to something else
We removed the ~/umbraco from the reserved path settings key. We could'nt find the location where the same setting is set in the web.config.
The variable is no longer needed as the "umbracoPath" value is automatically inserted into the reserved path setting.
2015-10-29 16:18:14 +01:00
Sebastiaan Janssen bbe4a87784 U4-6171 Continuous Deployment from Visual Studio Online to Azure Websites not working as expected
#U4-6171 Fixed
2015-10-29 16:07:07 +01:00
Sebastiaan Janssen cbd5c295bd Merge pull request #728 from vnbaaij/dev-v7
Fix for #U4-6171 Continuous Deployment from Visual Studio Online to A…
2015-10-29 16:05:20 +01:00
Shannon 0d29e1438c strange/crazy peta poco fix for cultures 2015-10-29 15:24:06 +01:00
Jeffrey Schoemaker 4796827f02 U4-1117 - Fixed any errors when renaming /umbraco to something else 2015-10-29 15:05:24 +01:00
Andy Rose c6f7ece764 Merge branch 'UKFest-U4-6980' of https://github.com/andycyberian/Umbraco-CMS into UKFest-U4-6980 2015-10-29 14:00:46 +00:00
Andy Rose e86aaefaaf U4-6980: Only assume a masterpage template if a MVC hasn't already been created 2015-10-29 13:59:09 +00:00
Andy Rose 97e9cd4be0 U4-6980: Only assume a masterpage template if a MVC hasn't already been created 2015-10-29 13:54:12 +00:00
Asbjørn Riis-Knudsen 63af822bad U4-6657: Use flexbox for mediapicker search field and upload button to allow button to scale for different translations 2015-10-29 14:52:18 +01:00
Tom Pipe b65f653c91 Fixes U4-1959 2015-10-29 13:08:37 +00:00
Damiaan 3b404a2f76 U4-7314 Change name of "Textbox Multiple" to "Large textbox" or "Textarea" 2015-10-29 13:54:16 +01:00
Tom Pipe e9567e7adc Fixes U4-6928 - Persist Creator ID of member 2015-10-29 12:52:36 +00:00
gerwin.bouwhuis 697daab4d7 change :get the correct alternative recursive field 2015-10-29 13:50:30 +01:00
Alejandro Ocampo 6c29ad854c Fixing "U4-6426 CTRL click should open in a new window" 2015-10-29 12:48:40 +00:00
gerwin.bouwhuis 93d89535aa undo 2015-10-29 13:32:50 +01:00
gerwin.bouwhuis eb093ca4a6 change : find the correct alternative recursive field 2015-10-29 13:23:43 +01:00
ryanmcdonough 1040f234dc Update grid.rte.directive.js 2015-10-29 12:09:29 +00:00
Sebastiaan Janssen 5a1ace9362 Revert "Fixes tests failing due to missing path"
This reverts commit 0c402310d9.
2015-10-29 13:00:51 +01:00
ryanmcdonough 3f835fe19c RTE now respects CSS Directory AppSetting.
Fixes #U4-5617
2015-10-29 12:00:43 +00:00
Dennis Spijkerboer bf43ce3281 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into UKFest-U4-7322 2015-10-29 12:57:27 +01:00
Dennis Spijkerboer c37ba0dc8a Checked if the trimmed value starts and ends with brackets. If so, use the trimmed value. 2015-10-29 12:56:07 +01:00
Jeffrey Schoemaker 7b5ad9a5c6 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:44:30 +01:00
Steve Morgan f0afa701bc Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-29 11:38:03 +00:00
Jeffrey Schoemaker 71dc1110d8 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:38:00 +01:00
Jeffrey Schoemaker 4de4eb9cc8 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:34:05 +01:00
Jeffrey Schoemaker 308d5ba344 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:32:57 +01:00
Tom Pipe 74dac71e8a Fixes U4-6167 - Show path of selected node 2015-10-29 11:31:53 +00:00
Jeffrey Schoemaker 64518774c6 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:29:24 +01:00
Jeffrey Schoemaker f65b0df3e2 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:28:23 +01:00
Jeffrey Schoemaker 5cfe9e85f8 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:27:32 +01:00
Jeffrey Schoemaker 61044b6018 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:23:47 +01:00
Jeffrey Schoemaker 00fc5a5bb2 U4-3774 / U4-4752 - Added a change password form to the user dialog 2015-10-29 12:22:20 +01:00
Stephan da85e4eb28 fixes list view ancestor check fix 2015-10-29 12:20:10 +01:00
Alejandro Ocampo 3f23865e0a Fixing "U4-5560 White space issue in content tree" 2015-10-29 11:06:31 +00:00
Shannon fbc08d66f1 fixes list view ancestor check 2015-10-29 12:05:46 +01:00
Shannon 79f04bf939 Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-10-29 11:57:07 +01:00
Shannon 9ab90595e2 Adds a filter to the interceptor to ignore errors for certain requests. 2015-10-29 11:56:23 +01:00
Marcin Zajkowski aac208c0e8 U4-6282 Add note to Register Partial Macro 2015-10-29 10:53:29 +00:00
Benas Brazdziunas f8e101ec13 U4-6511 make MNTP icon clickable 2015-10-29 10:43:04 +00:00
OptimisticCoder 23fcc1ac55 Added message on back office, when JS is disabled.
" JAVASCRIPT IS DISABLED. PLEASE ENABLE TO CONTINUE!"
2015-10-29 10:28:49 +00:00
Jordan Lane 6356531207 Focus new folder input automatically
http://issues.umbraco.org/issue/U4-7070
2015-10-29 10:22:34 +00:00
Sebastiaan Janssen 51b618826c Merge pull request #844 from ryanmcdonough/UKFest-U4-7151
Update database placeholder to backslash for instance name.
2015-10-29 11:16:56 +01:00
ryanmcdonough 04c28e5006 Update database placeholder to backslash for instance name. 2015-10-29 09:56:22 +00:00
andydale1982 e9ef9b9d75 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-29 09:54:19 +00:00
Sebastiaan Janssen c160ce98c1 Merge pull request #794 from mstodd/dev-v7
Setting UMB_CONTEXT with Domain "FALSE"
2015-10-29 10:19:28 +01:00
Sebastiaan Janssen c3a60ea0e0 Merge pull request #838 from ryanmcdonough/U4-7302
Login overlay now higher than bootstrap datepicker
2015-10-29 09:19:42 +01:00
Stephan 3408efdee4 Merge pull request #842 from umbraco/temp-U4-7285
U4-7285 Fix DistributedCache.ClearXxxCacheOnCurrentServer
2015-10-28 19:38:04 +01:00
Shannon 1f0dc7e65d Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-10-28 18:26:44 +01:00
Shannon f89083c772 bumped version 2015-10-28 18:26:34 +01:00
Sebastiaan Janssen 752065e540 Merge pull request #835 from umbraco/temp-U4-7032
U4-7032 7.3.0 Custom backoffice login provider requires simpler implementation extensibility
2015-10-28 18:25:10 +01:00
Sebastiaan Janssen 82e4e50584 Merge pull request #841 from umbraco/temp-U4-7231
U4-7231 TryConvertTo<T> of ObjectExtensions doesn't do null checks (c…
2015-10-28 17:09:30 +01:00
Sebastiaan Janssen 775e63148d Merge branch 'temp-U4-5963' into dev-v7 2015-10-28 17:02:51 +01:00
Sebastiaan Janssen 4259b02b8d Merge branch 'dev-v7' into temp-U4-5963
Conflicts:
	src/Umbraco.Web.UI.Client/src/controllers/main.controller.js
2015-10-28 16:56:40 +01:00
Sebastiaan Janssen 0c402310d9 Fixes tests failing due to missing path 2015-10-28 16:07:54 +01:00
Stephan 8d92330ad6 Fix broken comments 2015-10-28 15:01:23 +01:00
Sebastiaan Janssen 44e76f741f Merge pull request #840 from umbraco/temp-U4-7021
Fixes: U4-7021 "Actions" dropdown not available to children in listvi…
2015-10-28 14:52:48 +01:00
Shannon ecbced5c62 Massively simplifies the RenderActionInvoker which will support the native MVC caching and both async and non async support. U4-7270 Async Index actions for controllers implementing IRenderMvcController do not render view correctly 2015-10-28 14:31:40 +01:00
Shannon e6773dafc1 Updates PR to only display the prop alias in the title attribute when in debug mode. U4-4794 Display the property alias for content properties & provide a link to the content type from the generic properties tab 2015-10-28 12:45:15 +01:00
Shannon Deminick 7b8b7ed170 Merge pull request #837 from digbyswift/dev-v7
U4-7270 - Addition of allowance for async/await Index actions
2015-10-28 12:33:32 +01:00
Shannon Deminick c0997e1b9f Merge pull request #817 from tobbbe/hooverpropforalias
Hoover a property in backend to get its alias
2015-10-28 12:31:20 +01:00
Shannon d4f862a44f Merge branch 'dev-v7' of https://github.com/umbraco/Umbraco-CMS into dev-v7 2015-10-28 12:28:41 +01:00
Shannon 64c983eb07 Updates PR with fixes for code and implementation logic for the url list. 2015-10-28 12:28:29 +01:00
Shannon e25222162c Merge branch 'danieland-U4-7296-Link-to-each-items-doc-type-from-Properies-tab-in-Content-section' into dev-v7 2015-10-28 09:50:20 +01:00
Shannon e022687457 Merge branch 'U4-7296-Link-to-each-items-doc-type-from-Properies-tab-in-Content-section' of https://github.com/danieland/Umbraco-CMS into danieland-U4-7296-Link-to-each-items-doc-type-from-Properies-tab-in-Content-section 2015-10-28 09:49:55 +01:00
Shannon 84db2f4d85 U4-7285 Every server that reads a instruction from umbracoCacheInstruction will also write the same instruction to the database. Intentional ? 2015-10-27 19:24:56 +01:00
Shannon ef64409a9a U4-7231 TryConvertTo<T> of ObjectExtensions doesn't do null checks (causes handled errors on members after upgrade) 2015-10-27 18:29:46 +01:00
Shannon f0b68ac31e Fixes: U4-7021 "Actions" dropdown not available to children in listview nodes 2015-10-27 18:13:18 +01:00
Jeffrey Schoemaker dba7bcf60a Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-27 15:21:07 +01:00
Sebastiaan Janssen 6c80bd9eb9 U4-6385 Poor Handling of disallowedUploadFiles
#U4-6385 State: Review
2015-10-27 13:45:02 +01:00
Sebastiaan Janssen c7b7bf1510 Merge pull request #839 from umbraco/temp-U4-7214
U4-7214 Culture is not supported. Parameter name: name en_us is an in…
2015-10-27 11:27:53 +01:00
Shannon d1805b1448 U4-7214 Culture is not supported. Parameter name: name en_us is an invalid culture identifier error selecting user with different language after upgrade to 7.3.0 2015-10-27 11:22:28 +01:00
ryanmcdonough 780937dae9 Login overlay now higher than bootstrap datepicker 2015-10-26 15:49:55 +00:00
Shannon 9b054eaa47 Adds native ability to be able to fallback to default password checking if specifying a custom IBackOfficeUserPasswordChecker 2015-10-26 14:51:19 +01:00
bjarnef 1584530615 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-25 18:40:45 +01:00
bjarnef 100ca5caa6 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-25 18:29:13 +01:00
Shannon Deminick badd9ae289 Merge pull request #833 from umbraco/temp-U4-7201
Fixes: U4-7201 Can only save once in some editors after upgrade to 7.3
2015-10-23 11:45:24 +02:00
Kieron McIntyre db6755a5bb Addition of allowance for async/await Index actions 2015-10-23 10:04:14 +01:00
Daniel 738815170c more nullchecks needed?
null check that we can access user
2015-10-23 00:21:42 +02:00
Daniel ef091e8c3a U4-7296
http://issues.umbraco.org/issue/U4-7296
2015-10-22 23:41:18 +02:00
Daniel 71b3810e9c Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-22 21:49:49 +02:00
Shannon Deminick a1e62dae5e Merge pull request #834 from Attackmonkey/Fix-U4-7257
Fixes issue where dictionary items are displayed in a random order
2015-10-22 18:43:23 +02:00
Shannon 96c087d00f adds a ctor to the BackOfficeUserManager to allow better inheritance so that all settings are initialized by default, changes init method to be protected so other devs can use it. Adds a new property for devs to use to more easily extend the logic to just validate the username/password. 2015-10-22 18:40:20 +02:00
Tim 0568bf51f0 Fixes issue where dictionary items are displayed in a random order (see issue U4-7257) 2015-10-22 17:17:29 +01:00
Shannon Deminick e3bade4d1a Merge pull request #816 from Jeavon/U4-7260
Fix for U4-7260
2015-10-22 18:08:23 +02:00
Shannon Deminick 633b0b0003 Merge pull request #830 from albinj/dev-v7
U4-7283 - Only Master/Single ServerRole should be removing old instru…
2015-10-22 18:06:53 +02:00
Shannon Deminick 82adf48699 Merge pull request #805 from umbraco/temp-7234
Fixes #7234
2015-10-22 18:06:14 +02:00
Shannon 63be12b9fe Merge branch 'dev-v7-U4-6967' of https://github.com/bjarnef/Umbraco-CMS into bjarnef-dev-v7-U4-6967
Conflicts:
	src/Umbraco.Web.UI.Client/src/controllers/main.controller.js
2015-10-22 18:03:03 +02:00
Shannon 33f7ed5129 Fixes: U4-7223 GetCropUrl outputs html entities in url when used in css
Adding in HtmlHelper extensions for GetCropUrl.
2015-10-22 17:52:58 +02:00
Shannon 79583c571c Fixes: U4-7201 Can only save once in some editors after upgrade to 7.3 2015-10-22 15:40:12 +02:00
Shannon Deminick a7e2c0b4dc Merge pull request #804 from rasmusjp/feature/copy-content-dialog
Added recursive option to copy dialog
2015-10-22 10:38:07 +02:00
Shannon da48e1b392 Fixes: U4-6962 Public access in multiple levels is broken in 7.3
Ensured the backoffice UI will look at protection for the specific node only (no inheritance) when specifying public access.
Added non-recursive method to Access class.
Fixed bug causing the tree (child nodes) not to update correctly after changing public access on nodes.
2015-10-21 18:43:30 +02:00
albinj f535ece685 U4-7283 - Only Master/Single ServerRole should be removing old instructions from the database 2015-10-21 14:29:18 +01:00
Claus Jensen 04e46c7cd1 Merge pull request #815 from umbraco/temp-U4-7198
Fixes: U4-7198 Change default log4net config to include machine name …
2015-10-21 12:20:45 +02:00
Claus Jensen 1089aef00a Merge pull request #825 from umbraco/temp-U4-7217
Fixes: U4-7217 umbracoReservedUrls do not always resolve correctly.
2015-10-21 11:52:39 +02:00
bjarnef 0288d6ec89 Merge remote-tracking branch 'refs/remotes/umbraco/dev-v7' into dev-v7 2015-10-20 22:28:50 +02:00
Shannon 8950d94b25 adds unit test showing deleting a property group does not delete the property types. 2015-10-20 14:51:08 +02:00
Shannon bb6299cc01 Fixes: U4-7217 umbracoReservedUrls do not always resolve correctly.
Verified that all tests in GlobalSettingsTests run correctly.
Removes the strange old legacy compare thing and replaces it with a more readable Linq solution that ensures that the strings compared are always consistent.
2015-10-20 09:48:58 +02:00
Shannon Deminick 2176f2a1c9 Merge pull request #802 from tmoxon/dev-v7
Null check to prevent object reference error with public properties on custom indexers
2015-10-19 18:05:33 +02:00
Shannon Deminick 6a351bede1 Merge pull request #823 from umbraco/tmp-6797
U4-6797 - clear domains cache when deleting content
2015-10-19 15:52:37 +02:00
Shannon Deminick efc1aae0ae Merge pull request #822 from umbraco/tmp-3642
U4-3642 - proper validation msg in hostnames dialog
2015-10-19 15:49:09 +02:00
Stephan df39e027fd U4-3642 - proper validation msg in hostnames dialog 2015-10-16 17:23:12 +02:00
Stephan 64f05e4c97 U4-6797 - clear domains cache when deleting content 2015-10-16 17:21:44 +02:00
Shannon 30bc89ba93 U4-7092 can't show avatar because in China all users can't access to some sites. - Fixes where and how the avatar gets loaded, we first check if it exist or that we can connect to the internet and then load it, removes the avatar loading from the user service.. not sure why it was even there. 2015-10-16 14:45:49 +02:00
Shannon 841c8d69fc removes unused avatar directive 2015-10-16 14:30:23 +02:00
Shannon aa780d2b8a updates the googlefontpicker to lazy load the required google font lib. 2015-10-16 14:09:54 +02:00
Shannon 59f15f1618 updates the canvas loader, ensures that there are no external dependencies and that paths are relative. 2015-10-16 14:09:27 +02:00
TOXIC\Tobbe b2f0a9f23d Hoover a property in backend to get its alias 2015-10-16 14:07:19 +02:00
Shannon 40cd07f3f4 removes wide setting from canvas designer since it does not exist. 2015-10-16 13:36:30 +02:00
Shannon 99e7f84f79 Moves EnableCanvasDesigner to HtmlHelperRenderExtensions because it's for rendering html, obsoletes the old ones and fixes up the canvasdesigner to use
the correct umbraco paths instead of hard coded absolute paths.
2015-10-16 13:36:10 +02:00
Stephan 3a5a32c65f U4-7255 - fix RefreshInstruction serialization 2015-10-16 12:28:14 +02:00
Shannon c2627f3a2a removes strange parse feed method, what the heck is this? it isn't used so its removed 2015-10-15 19:17:47 +02:00
Shannon 22b8d41aee U4-5963 There should be no external request dependencies - updates nonodes, removes the font references that is never used, replaces the open sans font-reference with the one that we already have locally and uses it. 2015-10-15 19:08:53 +02:00
Jeavon ee47ea2026 Fix for U4-7260 - Multi node tree picker with no selection can cause a error to display in the backoffice 2015-10-15 16:29:40 +01:00
Shannon 57622cef9a Fixes: U4-7198 Change default log4net config to include machine name in file name 2015-10-15 17:14:24 +02:00
Shannon 30ad3f5aa6 bumps version 2015-10-15 17:12:13 +02:00
Shannon 2c11f0be0f updates method to use the available request instance instead of using HttpContext.Current! no idea why it was using that. 2015-10-15 17:07:46 +02:00
Shannon c514ce8da3 Fixes: U4-7248 Can't update roles on public access, obsolete AddOrUpdateRule 2015-10-15 17:06:00 +02:00
Sebastiaan Janssen 65d421b619 Can_Update_Rule was wrong, it's not possible to "update" a rule, can only add or remove - added a test for removing 2015-10-14 11:32:55 +02:00
Sebastiaan Janssen 62897f7064 Test was wrong, 2 rules were added and was expecting 1 to be returned, now that the code is fixed, this test needs to be corrected 2015-10-14 11:13:23 +02:00
Sebastiaan Janssen e0619edabb U4-6962 Public access in multiple levels is broken in 7.3
#U4-6962 Fixed
2015-10-14 10:19:39 +02:00
Sebastiaan Janssen 4142f47861 U4-6125 Installing MySQL Web Provider Breaks Page Publishing
#U4-6125 Fixed Due in version 7.3.1
2015-10-13 13:48:58 +02:00
Sebastiaan Janssen 7135f9a268 Removes message that is no longer correct 2015-10-13 13:12:28 +02:00
Niels Hartvig a75a58b719 Fixes #7234 2015-10-12 18:45:01 +02:00
Claus Jensen 7b969fc167 Merge pull request #790 from umbraco/U4-7075
Fixes: U4-7075 Enable Content and Media section by default for new ba…
2015-10-12 14:46:28 +02:00
Rasmus John Pedersen 78475b0686 Added recursive option to copy dialog 2015-10-09 20:25:51 +02:00
Shannon 4925d55e8f Fixes: U4-7197 open redirect vulnerability with ClientRedirect 2015-10-06 11:46:38 +02:00
Shannon 52d2306e17 Fixes: U4-7196 XSS vulnerability in BrowseRepository 2015-10-06 11:36:54 +02:00
Shannon 5e5207d4f3 Fixes: U4-7194 XSS issue with regexws page, U4-7195 XSS issue with editview.aspx 2015-10-06 10:56:16 +02:00
Sebastiaan Janssen 96d46c82fe U4-7193 NuGet install doesn't add all bindingRedirects
#U4-7193 Fixed Due in version 7.3.1
2015-10-06 08:58:19 +02:00
Per Ploug 86bf50db12 Merge pull request #803 from Tazer/dev-v7
Updated readme with working intro video , that is for umbraco v7
2015-10-05 14:28:08 +02:00
Patrik 14778422e6 Updated readme with working intro video , that is for umbraco v7 2015-10-05 14:22:57 +02:00
tmoxon 6a931273a6 The indexing api would break if an indexer was created with a public property defaulting to a null value. This would result in an object reference error in the admin system. Added null check and warning to the log. 2015-10-01 14:42:32 +01:00
Sebastiaan Janssen 5fab1ea436 U4-7164 Nuget Update-Package UmbracoCms fails if I have removed dashboard section
#U4-7164 Fixed Due in version 7.3.1
2015-10-01 08:52:40 +02:00
Daniel Andreasen 5310ce38fd Merge pull request #1 from umbraco/dev-v7
update original fork
2015-09-27 23:30:26 +02:00
m_stodd 7abbfbcfcc Setting UMB_CONTEXT with Domain "FALSE"
Running Umbraco on localhost, Chrome does not handle received 'Set Cookie's with no domain.  "FALSE" works as noted here:  http://stackoverflow.com/questions/1134290/cookies-on-localhost-with-explicit-domain
2015-09-18 02:13:12 -05:00
Vincent Baaij a22b97643a Merge remote-tracking branch 'umbraco/dev-v7' into dev-v7 2015-09-14 21:53:33 +02:00
Claus 80be614731 Fixes: U4-7075 Enable Content and Media section by default for new backoffice users 2015-09-14 11:06:03 +02:00
Vincent Baaij e25886180a Merge remote-tracking branch 'upstream/dev-v7' into dev-v7 2015-09-09 13:57:35 +02:00
Vincent Baaij d5a41d41e9 Merge remote-tracking branch 'upstream/dev-v7' into dev-v7 2015-08-18 09:14:11 +02:00
Vincent Baaij 2e43a34812 Merge remote-tracking branch 'upstream/dev-v7' into dev-v7 2015-06-25 17:37:36 +02:00
Vincent Baaij 1b9afc961b Fix for #U4-6171 Continuous Deployment from Visual Studio Online to Azure Websites not working as expected 2015-06-25 17:35:15 +02:00
247 changed files with 3283 additions and 1413 deletions
+1
View File
@@ -131,3 +131,4 @@ src/*.boltdata/
src/umbraco.sln.ide/*
build/UmbracoCms.*/
src/.vs/
src/Umbraco.Web.UI/umbraco/js/install.loader.js
+2 -2
View File
@@ -7,9 +7,9 @@ The easiest way to get started is to run `build/build.bat` which will build both
If you're interested in making changes to Belle make sure to read the [Belle ReadMe file](src/Umbraco.Web.UI.Client/README.md). Note that you can always [download a nightly build](http://nightly.umbraco.org/umbraco%207.0.0/) so you don't have to build the code yourself.
## Watch a five minute introduction video ##
## Watch a introduction video ##
[![ScreenShot](http://umbraco.com/images/whatisumbraco.png)](http://umbraco.org/help-and-support/video-tutorials/getting-started/what-is-umbraco)
[![ScreenShot](http://umbraco.com/images/whatisumbraco.png)](https://umbraco.tv/videos/umbraco-v7/content-editor/basics/introduction/cms-explanation/)
## Umbraco - the simple, flexible and friendly ASP.NET CMS ##
+1 -1
View File
@@ -26,7 +26,7 @@
<dependency id="HtmlAgilityPack" version="[1.4.9, 2.0.0)" />
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
<dependency id="SharpZipLib" version="[0.86.0, 1.0.0)" />
<dependency id="MySql.Data" version="[6.9.7, 7.0.0)" />
<dependency id="MySql.Data" version="[6.9.8, 7.0.0)" />
<dependency id="xmlrpcnet" version="[2.5.0, 3.0.0)" />
<dependency id="ClientDependency" version="[1.8.4, 2.0.0)" />
<dependency id="ClientDependency-Mvc5" version="[1.8.0, 2.0.0)" />
+12 -1
View File
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyUmbracoFilesToWebRootForDeploy" AfterTargets="CopyAllFilesToSingleFolderForMsdeploy">
<PropertyGroup>
<UmbracoFilesFolder>$(MSBuildThisFileDirectory)..\UmbracoFiles\</UmbracoFilesFolder>
</PropertyGroup>
<ItemGroup>
<UmbracoFiles Include="$(UmbracoFilesFolder)**\*" />
</ItemGroup>
<Copy SourceFiles="%(UmbracoFiles.FullPath)" DestinationFiles="$(_PackageTempDir)\%(RecursiveDir)%(Filename)%(Extension)" Condition="!Exists('%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="CopyUmbracoFilesToWebRoot" BeforeTargets="AfterBuild">
<!-- This copies the files listed in `AddUmbracoFilesToOutput` to the webroot during NuGet install and should -->
<!-- not be altered to support automated builds, use `CopyUmbracoFilesToWebRootForDeploy` for that instead -->
<PropertyGroup>
<UmbracoFilesFolder>$(MSBuildThisFileDirectory)..\UmbracoFiles\</UmbracoFilesFolder>
</PropertyGroup>
@@ -47,4 +58,4 @@
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
</Project>
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<dashBoard xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<section alias="StartupSettingsDashboardSection" xdt:Locator="Match(alias)">
<section alias="StartupSettingsDashboardSection" xdt:Locator="Match(alias)" xdt:Transform="InsertIfMissing">
<tab caption="Get Started" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
<tab caption="Welcome" xdt:Locator="Match(caption)" xdt:Transform="InsertIfMissing">
<control showOnce="true" addPanel="true" panelCaption="" xdt:Transform="InsertIfMissing">
@@ -20,7 +20,7 @@
</tab>
</section>
<section alias="StartupDeveloperDashboardSection" xdt:Locator="Match(alias)">
<section alias="StartupDeveloperDashboardSection" xdt:Locator="Match(alias)" xdt:Transform="InsertIfMissing">
<tab caption="Get Started" xdt:Locator="Match(caption)" xdt:Transform="Replace">
<control showOnce="true" addPanel="true" panelCaption="">
views/dashboard/developer/developerdashboardvideos.html
@@ -29,7 +29,7 @@
<tab caption="Examine Management" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
</section>
<section alias="StartupDeveloperDashboardSection" xdt:Locator="Match(alias)">
<section alias="StartupDeveloperDashboardSection" xdt:Locator="Match(alias)" xdt:Transform="InsertIfMissing">
<tab caption="Examine Management" xdt:Locator="Match(caption)" xdt:Transform="InsertIfMissing">
<control>
views/dashboard/developer/examinemanagement.html
@@ -39,10 +39,10 @@
<control>
views/dashboard/developer/xmldataintegrityreport.html
</control>
</tab>
</tab>
</section>
<section alias="StartupMediaDashboardSection" xdt:Locator="Match(alias)">
<section alias="StartupMediaDashboardSection" xdt:Locator="Match(alias)" xdt:Transform="InsertIfMissing">
<tab caption="Get Started" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
<tab caption="Content" xdt:Locator="Match(caption)" xdt:Transform="InsertIfMissing" />
<tab caption="Content" xdt:Locator="Match(caption)" xdt:Transform="Replace">
@@ -52,7 +52,7 @@
</tab>
</section>
<section alias="StartupDashboardSection" xdt:Locator="Match(alias)">
<section alias="StartupDashboardSection" xdt:Locator="Match(alias)" xdt:Transform="InsertIfMissing">
<tab caption="Get Started" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
<tab caption="Get Started" xdt:Transform="Insert">
<access>
@@ -62,17 +62,10 @@
views/dashboard/default/startupdashboardintro.html
</control>
</tab>
<tab caption="Change password" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
<tab caption="Change Password" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
<tab caption="Change Password" xdt:Transform="Insert">
<control showOnce="false" addPanel="false" panelCaption="">
views/dashboard/ChangePassword.html
</control>
</tab>
<tab caption="Last Edits" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
</section>
<section alias="StartupMemberDashboardSection" xdt:Locator="Match(alias)">
<section alias="StartupMemberDashboardSection" xdt:Locator="Match(alias)" xdt:Transform="InsertIfMissing">
<tab caption="Get Started" xdt:Locator="Match(caption)" xdt:Transform="Remove" />
<tab caption="Get Started" xdt:Transform="Insert">
<control showOnce="true" addPanel="true" panelCaption="">
-3
View File
@@ -10,9 +10,6 @@
Don't forget to build!
When upgrading your website using NuGet you should answer "No" to the questions to overwrite the Web.config
file (and config files in the config folder).
We've done our best to transform your configuration files but in case something is not quite right: remember we
backed up your files in App_Data\NuGetBackup so you can find the original files before they were transformed.
+14 -5
View File
@@ -48,6 +48,11 @@
<system.web xdt:Transform="InsertIfMissing" />
<system.web>
<siteMap xdt:Transform="Remove" />
<siteMap xdt:Transform="InsertIfMissing">
<providers xdt:Transform="InsertIfMissing">
<remove name="MySqlSiteMapProvider" xdt:Transform="InsertIfMissing" />
</providers>
</siteMap>
<httpRuntime xdt:Transform="InsertIfMissing" />
<httpRuntime targetFramework="4.5" xdt:Transform="SetAttributes(targetFramework)" />
<membership defaultProvider="DefaultMembershipProvider" xdt:Locator="Match(defaultProvider)" xdt:Transform="Remove" />
@@ -76,6 +81,10 @@
</compilation>
<compilation>
<assemblies>
<remove assembly="System.Web.Http" xdt:Locator="Match(assembly)" xdt:Transform="Remove" />
<remove assembly="System.Net.Http" xdt:Locator="Match(assembly)" xdt:Transform="Remove" />
</assemblies>
<assemblies>
<remove assembly="System.Web.Http" xdt:Locator="Match(assembly)" xdt:Transform="InsertBefore(/configuration/system.web/compilation/assemblies/add)" />
<remove assembly="System.Net.Http" xdt:Locator="Match(assembly)" xdt:Transform="InsertBefore(/configuration/system.web/compilation/assemblies/add)" />
@@ -172,23 +181,23 @@
<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>
<dependentAssembly xdt:Transform="Insert">
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<dependentAssembly xdt:Transform="Insert">
<assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<dependentAssembly xdt:Transform="Insert">
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<dependentAssembly xdt:Transform="Insert">
<assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
</dependentAssembly>
<dependentAssembly>
<dependentAssembly xdt:Transform="Insert">
<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>
+1
View File
@@ -63,6 +63,7 @@ if ($project) {
if(Test-Path $umbracoBinFolder\MiniProfiler.dll) { Remove-Item $umbracoBinFolder\MiniProfiler.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\MySql.Data.dll) { Remove-Item $umbracoBinFolder\MySql.Data.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\Newtonsoft.Json.dll) { Remove-Item $umbracoBinFolder\Newtonsoft.Json.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Web.Helpers.dll) { Remove-Item $umbracoBinFolder\System.Web.Helpers.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Net.Http.Formatting.dll) { Remove-Item $umbracoBinFolder\System.Net.Http.Formatting.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Web.Http.dll) { Remove-Item $umbracoBinFolder\System.Web.Http.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Web.Http.WebHost.dll) { Remove-Item $umbracoBinFolder\System.Web.Http.WebHost.dll -Force -Confirm:$false }
+3 -4
View File
@@ -45,9 +45,6 @@ del ..\src\Umbraco.Web.UI\UserControls\*.*
echo Removing masterpage files
del ..\src\Umbraco.Web.UI\masterpages\*.*
echo Removing view files
del ..\src\Umbraco.Web.UI\Views\*.*
echo Removing razor files
del ..\src\Umbraco.Web.UI\macroScripts\*.*
@@ -104,7 +101,9 @@ echo Removing user control files
FOR %%A IN (..\src\Umbraco.Web.UI\usercontrols\*.*) DO DEL %%A
echo Removing view files
FOR %%A IN (..\src\Umbraco.Web.UI\Views\*.*) DO DEL %%A
ATTRIB +H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
FOR %%A IN (..\src\Umbraco.Web.UI\Views\) DO DEL /Q /S *.cshtml -H
ATTRIB -H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
echo Removing razor files
FOR %%A IN (..\src\Umbraco.Web.UI\macroScripts\*.*) DO DEL %%A
+6 -4
View File
@@ -54,9 +54,6 @@ del ..\src\Umbraco.Web.UI\UserControls\*.*
echo Removing masterpage files
del ..\src\Umbraco.Web.UI\masterpages\*.*
echo Removing view files
del ..\src\Umbraco.Web.UI\Views\*.*
echo Removing razor files
del ..\src\Umbraco.Web.UI\macroScripts\*.*
@@ -122,7 +119,9 @@ echo Removing user control files
FOR %%A IN (..\src\Umbraco.Web.UI\usercontrols\*.*) DO DEL %%A
echo Removing view files
FOR %%A IN (..\src\Umbraco.Web.UI\Views\*.*) DO DEL %%A
ATTRIB +H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
FOR %%A IN (..\src\Umbraco.Web.UI\Views\) DO DEL /Q /S *.cshtml -H
ATTRIB -H ..\src\Umbraco.Web.UI\Views\Partials\Grid\*.cshtml /S
echo Removing razor files
FOR %%A IN (..\src\Umbraco.Web.UI\macroScripts\*.*) DO DEL %%A
@@ -151,6 +150,9 @@ rmdir "..\src\Umbraco.Web.UI\usercontrols\umbracoContour\" /S /Q
echo Start with a clean web.config
copy ..\src\Umbraco.Web.UI\web.Template.config ..\src\Umbraco.Web.UI\web.config /Y
echo Start with a clean web.config
copy ..\src\Umbraco.Web.UI\web.Template.config ..\src\Umbraco.Web.UI\web.config /Y
echo "Umbraco install reverted to clean install"
pause
exit
+1 -1
View File
@@ -1,2 +1,2 @@
# Usage: on line 2 put the release version, on line 3 put the version comment (example: beta)
7.3.0
7.3.3
+2 -2
View File
@@ -11,5 +11,5 @@ using System.Resources;
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("7.3.0")]
[assembly: AssemblyInformationalVersion("7.3.0")]
[assembly: AssemblyFileVersion("7.3.3")]
[assembly: AssemblyInformationalVersion("7.3.3")]
+1 -1
View File
@@ -11,7 +11,7 @@ namespace Umbraco.Core
/// <summary>
/// A resolver to return all IAction objects
/// </summary>
internal sealed class ActionsResolver : LazyManyObjectsResolverBase<ActionsResolver, IAction>
public sealed class ActionsResolver : LazyManyObjectsResolverBase<ActionsResolver, IAction>
{
/// <summary>
/// Constructor
+8 -2
View File
@@ -283,7 +283,12 @@ namespace Umbraco.Core
{
var configStatus = ConfigurationStatus;
var currentVersion = UmbracoVersion.GetSemanticVersion();
var ok = configStatus == currentVersion;
var ok =
//we are not configured if this is null
string.IsNullOrWhiteSpace(configStatus) == false
//they must match
&& configStatus == currentVersion;
if (ok)
{
@@ -308,8 +313,9 @@ namespace Umbraco.Core
return ok;
}
catch
catch (Exception ex)
{
LogHelper.Error<ApplicationContext>("Error determining if application is configured, returning false", ex);
return false;
}
+28 -10
View File
@@ -1,5 +1,6 @@
using System;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
@@ -117,38 +118,55 @@ namespace Umbraco.Core
private class NamedSemaphoreReleaser : CriticalFinalizerObject, IDisposable
{
private readonly Semaphore _semaphore;
private GCHandle _handle;
internal NamedSemaphoreReleaser(Semaphore semaphore)
{
_semaphore = semaphore;
_handle = GCHandle.Alloc(_semaphore);
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
GC.SuppressFinalize(this); // finalize will not run
}
private void Dispose(bool disposing)
{
// critical
_handle.Free();
_semaphore.Release();
_semaphore.Dispose();
}
// we WANT to release the semaphore because it's a system object
// ie a critical non-managed resource - so we inherit from CriticalFinalizerObject
// which means that the finalizer "should" run in all situations
// we WANT to release the semaphore because it's a system object, ie a critical
// non-managed resource - and if it is not released then noone else can acquire
// the lock - so we inherit from CriticalFinalizerObject which means that the
// finalizer "should" run in all situations - there is always a chance that it
// does not run and the semaphore remains "acquired" but then chances are the
// whole process (w3wp.exe...) is going down, at which point the semaphore will
// be destroyed by Windows.
// however... that can fail with System.ObjectDisposedException because the
// underlying handle was closed... because we cannot guarantee that the semaphore
// is not gone already... unless we get a GCHandle = GCHandle.Alloc(_semaphore);
// which should keep it around and then we free the handle?
// however, the semaphore is a managed object, and so when the finalizer runs it
// might have been finalized already, and then we get a, ObjectDisposedException
// in the finalizer - which is bad.
// so... I'm not sure this is safe really...
// in order to prevent this we do two things
// - use a GCHandler to ensure the semaphore is still there when the finalizer
// runs, so we can actually release it
// - wrap the finalizer code in a try...catch to make sure it never throws
~NamedSemaphoreReleaser()
{
Dispose(false);
try
{
Dispose(false);
}
catch
{
// we do NOT want the finalizer to throw - never ever
}
}
}
+23 -120
View File
@@ -36,7 +36,7 @@ namespace Umbraco.Core.Configuration
//make this volatile so that we can ensure thread safety with a double check lock
private static volatile string _reservedUrlsCache;
private static string _reservedPathsCache;
private static StartsWithContainer _reservedList = new StartsWithContainer();
private static HashSet<string> _reservedList = new HashSet<string>();
private static string _reservedPaths;
private static string _reservedUrls;
//ensure the built on (non-changeable) reserved paths are there at all times
@@ -767,38 +767,31 @@ namespace Umbraco.Core.Configuration
// store references to strings to determine changes
_reservedPathsCache = GlobalSettings.ReservedPaths;
_reservedUrlsCache = GlobalSettings.ReservedUrls;
string _root = SystemDirectories.Root.Trim().ToLower();
// add URLs and paths to a new list
StartsWithContainer _newReservedList = new StartsWithContainer();
foreach (string reservedUrl in _reservedUrlsCache.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries))
var newReservedList = new HashSet<string>();
foreach (var reservedUrlTrimmed in _reservedUrlsCache
.Split(new[] {","}, StringSplitOptions.RemoveEmptyEntries)
.Select(x => x.Trim().ToLowerInvariant())
.Where(x => x.IsNullOrWhiteSpace() == false)
.Select(reservedUrl => IOHelper.ResolveUrl(reservedUrl).Trim().EnsureStartsWith("/"))
.Where(reservedUrlTrimmed => reservedUrlTrimmed.IsNullOrWhiteSpace() == false))
{
if (string.IsNullOrWhiteSpace(reservedUrl))
continue;
//resolves the url to support tilde chars
string reservedUrlTrimmed = IOHelper.ResolveUrl(reservedUrl.Trim()).Trim().ToLower();
if (reservedUrlTrimmed.Length > 0)
_newReservedList.Add(reservedUrlTrimmed);
newReservedList.Add(reservedUrlTrimmed);
}
foreach (string reservedPath in _reservedPathsCache.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries))
foreach (var reservedPathTrimmed in _reservedPathsCache
.Split(new[] {","}, StringSplitOptions.RemoveEmptyEntries)
.Select(x => x.Trim().ToLowerInvariant())
.Where(x => x.IsNullOrWhiteSpace() == false)
.Select(reservedPath => IOHelper.ResolveUrl(reservedPath).Trim().EnsureStartsWith("/").EnsureEndsWith("/"))
.Where(reservedPathTrimmed => reservedPathTrimmed.IsNullOrWhiteSpace() == false))
{
bool trimEnd = !reservedPath.EndsWith("/");
if (string.IsNullOrWhiteSpace(reservedPath))
continue;
//resolves the url to support tilde chars
string reservedPathTrimmed = IOHelper.ResolveUrl(reservedPath.Trim()).Trim().ToLower();
if (reservedPathTrimmed.Length > 0)
_newReservedList.Add(reservedPathTrimmed + (reservedPathTrimmed.EndsWith("/") ? "" : "/"));
newReservedList.Add(reservedPathTrimmed);
}
// use the new list from now on
_reservedList = _newReservedList;
_reservedList = newReservedList;
}
}
}
@@ -806,107 +799,17 @@ namespace Umbraco.Core.Configuration
//The url should be cleaned up before checking:
// * If it doesn't contain an '.' in the path then we assume it is a path based URL, if that is the case we should add an trailing '/' because all of our reservedPaths use a trailing '/'
// * We shouldn't be comparing the query at all
var pathPart = url.Split('?')[0];
if (!pathPart.Contains(".") && !pathPart.EndsWith("/"))
var pathPart = url.Split(new[] {'?'}, StringSplitOptions.RemoveEmptyEntries)[0].ToLowerInvariant();
if (pathPart.Contains(".") == false)
{
pathPart += "/";
pathPart = pathPart.EnsureEndsWith('/');
}
// return true if url starts with an element of the reserved list
return _reservedList.StartsWith(pathPart.ToLowerInvariant());
return _reservedList.Any(x => pathPart.InvariantStartsWith(x));
}
/// <summary>
/// Structure that checks in logarithmic time
/// if a given string starts with one of the added keys.
/// </summary>
private class StartsWithContainer
{
/// <summary>Internal sorted list of keys.</summary>
public SortedList<string, string> _list
= new SortedList<string, string>(StartsWithComparator.Instance);
/// <summary>
/// Adds the specified new key.
/// </summary>
/// <param name="newKey">The new key.</param>
public void Add(string newKey)
{
// if the list already contains an element that begins with newKey, return
if (String.IsNullOrEmpty(newKey) || StartsWith(newKey))
return;
// create a new collection, so the old one can still be accessed
SortedList<string, string> newList
= new SortedList<string, string>(_list.Count + 1, StartsWithComparator.Instance);
// add only keys that don't already start with newKey, others are unnecessary
foreach (string key in _list.Keys)
if (!key.StartsWith(newKey))
newList.Add(key, null);
// add the new key
newList.Add(newKey, null);
// update the list (thread safe, _list was never in incomplete state)
_list = newList;
}
/// <summary>
/// Checks if the given string starts with any of the added keys.
/// </summary>
/// <param name="target">The target.</param>
/// <returns>true if a key is found that matches the start of target</returns>
/// <remarks>
/// Runs in O(s*log(n)), with n the number of keys and s the length of target.
/// </remarks>
public bool StartsWith(string target)
{
return _list.ContainsKey(target);
}
/// <summary>Comparator that tests if a string starts with another.</summary>
/// <remarks>Not a real comparator, since it is not reflexive. (x==y does not imply y==x)</remarks>
private sealed class StartsWithComparator : IComparer<string>
{
/// <summary>Default string comparer.</summary>
private readonly static Comparer<string> _stringComparer = Comparer<string>.Default;
/// <summary>Gets an instance of the StartsWithComparator.</summary>
public static readonly StartsWithComparator Instance = new StartsWithComparator();
/// <summary>
/// Tests if whole begins with all characters of part.
/// </summary>
/// <param name="part">The part.</param>
/// <param name="whole">The whole.</param>
/// <returns>
/// Returns 0 if whole starts with part, otherwise performs standard string comparison.
/// </returns>
public int Compare(string part, string whole)
{
// let the default string comparer deal with null or when part is not smaller then whole
if (part == null || whole == null || part.Length >= whole.Length)
return _stringComparer.Compare(part, whole);
////ensure both have a / on the end
//part = part.EndsWith("/") ? part : part + "/";
//whole = whole.EndsWith("/") ? whole : whole + "/";
//if (part.Length >= whole.Length)
// return _stringComparer.Compare(part, whole);
// loop through all characters that part and whole have in common
int pos = 0;
bool match;
do
{
match = (part[pos] == whole[pos]);
} while (match && ++pos < part.Length);
// return result of last comparison
return match ? 0 : (part[pos] < whole[pos] ? -1 : 1);
}
}
}
}
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("7.3.0");
private static readonly Version Version = new Version("7.3.3");
/// <summary>
/// Gets the current version of Umbraco.
+1 -1
View File
@@ -43,7 +43,7 @@
public const string Users = "users";
/// <summary>
/// Application alias for the users section.
/// Application alias for the forms section.
/// </summary>
public const string Forms = "forms";
}
@@ -310,13 +310,13 @@ namespace Umbraco.Core
public const string TextboxAlias = "Umbraco.Textbox";
/// <summary>
/// Guid for the Textbox multiple datatype.
/// Guid for the Textarea datatype.
/// </summary>
[Obsolete("GUIDs are no longer used to reference Property Editors, use the Alias constant instead. This will be removed in future versions")]
public const string TextboxMultiple = "67DB8357-EF57-493E-91AC-936D305E0F2A";
/// <summary>
/// Alias for the Textbox multiple datatype.
/// Alias for the Textarea datatype.
/// </summary>
public const string TextboxMultipleAlias = "Umbraco.TextboxMultiple";
+6 -1
View File
@@ -1,4 +1,7 @@
namespace Umbraco.Core
using System;
using System.ComponentModel;
namespace Umbraco.Core
{
public static partial class Constants
{
@@ -15,6 +18,8 @@
/// <summary>
/// The auth cookie name
/// </summary>
[Obsolete("DO NOT USE THIS, USE ISecuritySection.AuthCookieName, this will be removed in future versions")]
[EditorBrowsable(EditorBrowsableState.Never)]
public const string AuthCookieName = "UMB_UCONTEXT";
}
+1 -1
View File
@@ -154,7 +154,7 @@ namespace Umbraco.Core.IO
{
get
{
return IOHelper.ReturnPath("umbracoWebservicesPath", "~/umbraco/webservices");
return IOHelper.ReturnPath("umbracoWebservicesPath", Umbraco.EnsureEndsWith("/") + "webservices");
}
}
+1 -2
View File
@@ -560,8 +560,7 @@ namespace Umbraco.Core.Models
//Additional thumbnails configured as prevalues on the DataType
if (thumbnailSizes != null)
{
var sep = (thumbnailSizes.Contains("") == false && thumbnailSizes.Contains(",")) ? ',' : ';';
foreach (var thumb in thumbnailSizes.Split(sep))
foreach (var thumb in thumbnailSizes.Split(new[] { ";", "," }, StringSplitOptions.RemoveEmptyEntries))
{
int thumbSize;
if (thumb != "" && int.TryParse(thumb, out thumbSize))
@@ -533,6 +533,18 @@ namespace Umbraco.Core.Models
/// <param name="propertyGroupName">Name of the <see cref="PropertyGroup"/> to remove</param>
public void RemovePropertyGroup(string propertyGroupName)
{
// if no group exists with that name, do nothing
var group = PropertyGroups[propertyGroupName];
if (group == null) return;
// re-assign the group's properties to no group
foreach (var property in group.PropertyTypes)
{
property.PropertyGroupId = new Lazy<int>(() => 0);
_propertyTypes.Add(property);
}
// actually remove the group
PropertyGroups.RemoveItem(propertyGroupName);
OnPropertyChanged(PropertyGroupCollectionSelector);
}
@@ -4,6 +4,7 @@ using AutoMapper;
using Umbraco.Core.Models.Mapping;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Security;
namespace Umbraco.Core.Models.Identity
{
@@ -24,6 +25,18 @@ namespace Umbraco.Core.Models.Identity
.ForMember(user => user.UserTypeAlias, expression => expression.MapFrom(user => user.UserType.Alias))
.ForMember(user => user.AccessFailedCount, expression => expression.MapFrom(user => user.FailedPasswordAttempts))
.ForMember(user => user.AllowedSections, expression => expression.MapFrom(user => user.AllowedSections.ToArray()));
config.CreateMap<BackOfficeIdentityUser, UserData>()
.ConstructUsing((BackOfficeIdentityUser user) => new UserData(Guid.NewGuid().ToString("N"))) //this is the 'session id'
.ForMember(detail => detail.Id, opt => opt.MapFrom(user => user.Id))
.ForMember(detail => detail.AllowedApplications, opt => opt.MapFrom(user => user.AllowedSections))
.ForMember(detail => detail.RealName, opt => opt.MapFrom(user => user.Name))
.ForMember(detail => detail.Roles, opt => opt.MapFrom(user => new[] { user.UserTypeAlias }))
.ForMember(detail => detail.StartContentNode, opt => opt.MapFrom(user => user.StartContentId))
.ForMember(detail => detail.StartMediaNode, opt => opt.MapFrom(user => user.StartMediaId))
.ForMember(detail => detail.Username, opt => opt.MapFrom(user => user.UserName))
.ForMember(detail => detail.Culture, opt => opt.MapFrom(user => user.Culture))
.ForMember(detail => detail.SessionId, opt => opt.MapFrom(user => user.SecurityStamp.IsNullOrWhiteSpace() ? Guid.NewGuid().ToString("N") : user.SecurityStamp));
}
private string GetPasswordHash(string storedPass)
+1 -1
View File
@@ -64,7 +64,7 @@ namespace Umbraco.Core.Models
[IgnoreDataMember]
public CultureInfo CultureInfo
{
get { return CultureInfo.CreateSpecificCulture(IsoCode); }
get { return CultureInfo.GetCultureInfo(IsoCode); }
}
}
}
+6 -6
View File
@@ -280,7 +280,7 @@ namespace Umbraco.Core.Models
//This is the default value if the prop is not found
true);
if (a.Success == false) return a.Result;
if (Properties[Constants.Conventions.Member.IsApproved].Value == null) return true;
var tryConvert = Properties[Constants.Conventions.Member.IsApproved].Value.TryConvertTo<bool>();
if (tryConvert.Success)
{
@@ -313,7 +313,7 @@ namespace Umbraco.Core.Models
{
var a = WarnIfPropertyTypeNotFoundOnGet(Constants.Conventions.Member.IsLockedOut, "IsLockedOut", false);
if (a.Success == false) return a.Result;
if (Properties[Constants.Conventions.Member.IsLockedOut].Value == null) return false;
var tryConvert = Properties[Constants.Conventions.Member.IsLockedOut].Value.TryConvertTo<bool>();
if (tryConvert.Success)
{
@@ -346,7 +346,7 @@ namespace Umbraco.Core.Models
{
var a = WarnIfPropertyTypeNotFoundOnGet(Constants.Conventions.Member.LastLoginDate, "LastLoginDate", default(DateTime));
if (a.Success == false) return a.Result;
if (Properties[Constants.Conventions.Member.LastLoginDate].Value == null) return default(DateTime);
var tryConvert = Properties[Constants.Conventions.Member.LastLoginDate].Value.TryConvertTo<DateTime>();
if (tryConvert.Success)
{
@@ -379,7 +379,7 @@ namespace Umbraco.Core.Models
{
var a = WarnIfPropertyTypeNotFoundOnGet(Constants.Conventions.Member.LastPasswordChangeDate, "LastPasswordChangeDate", default(DateTime));
if (a.Success == false) return a.Result;
if (Properties[Constants.Conventions.Member.LastPasswordChangeDate].Value == null) return default(DateTime);
var tryConvert = Properties[Constants.Conventions.Member.LastPasswordChangeDate].Value.TryConvertTo<DateTime>();
if (tryConvert.Success)
{
@@ -412,7 +412,7 @@ namespace Umbraco.Core.Models
{
var a = WarnIfPropertyTypeNotFoundOnGet(Constants.Conventions.Member.LastLockoutDate, "LastLockoutDate", default(DateTime));
if (a.Success == false) return a.Result;
if (Properties[Constants.Conventions.Member.LastLockoutDate].Value == null) return default(DateTime);
var tryConvert = Properties[Constants.Conventions.Member.LastLockoutDate].Value.TryConvertTo<DateTime>();
if (tryConvert.Success)
{
@@ -446,7 +446,7 @@ namespace Umbraco.Core.Models
{
var a = WarnIfPropertyTypeNotFoundOnGet(Constants.Conventions.Member.FailedPasswordAttempts, "FailedPasswordAttempts", 0);
if (a.Success == false) return a.Result;
if (Properties[Constants.Conventions.Member.FailedPasswordAttempts].Value == null) return default(int);
var tryConvert = Properties[Constants.Conventions.Member.FailedPasswordAttempts].Value.TryConvertTo<int>();
if (tryConvert.Success)
{
@@ -11,7 +11,7 @@ namespace Umbraco.Core.Models.Rdbms
internal class MigrationDto
{
[Column("id")]
[PrimaryKeyColumn(AutoIncrement = true)]
[PrimaryKeyColumn(AutoIncrement = true, IdentitySeed = 100)]
public int Id { get; set; }
[Column("name")]
@@ -2,6 +2,7 @@
using System.Globalization;
using System.Linq;
using System.Threading;
using Umbraco.Core.Models.Identity;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Services;
@@ -0,0 +1,38 @@
using System.Collections.Concurrent;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Rdbms;
namespace Umbraco.Core.Persistence.Mappers
{
/// <summary>
/// Represents a <see cref="TaskType"/> to DTO mapper used to translate the properties of the public api
/// implementation to that of the database's DTO as sql: [tableName].[columnName].
/// </summary>
[MapperFor(typeof(TaskType))]
public sealed class TaskTypeMapper : BaseMapper
{
private static readonly ConcurrentDictionary<string, DtoMapModel> PropertyInfoCacheInstance = new ConcurrentDictionary<string, DtoMapModel>();
//NOTE: its an internal class but the ctor must be public since we're using Activator.CreateInstance to create it
// otherwise that would fail because there is no public constructor.
public TaskTypeMapper()
{
BuildMap();
}
#region Overrides of BaseMapper
internal override ConcurrentDictionary<string, DtoMapModel> PropertyInfoCache
{
get { return PropertyInfoCacheInstance; }
}
internal override void BuildMap()
{
CacheMap<TaskType, TaskTypeDto>(src => src.Id, dto => dto.Id);
CacheMap<TaskType, TaskTypeDto>(src => src.Alias, dto => dto.Alias);
}
#endregion
}
}
@@ -108,7 +108,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = 0, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = new Guid(Constants.ObjectTypes.MediaRecycleBin), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -92, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-92", SortOrder = 35, UniqueId = new Guid("f0bc4bfb-b499-40d6-ba86-058885a5178c"), Text = "Label", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -90, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-90", SortOrder = 34, UniqueId = new Guid("84c6b441-31df-4ffe-b67e-67d5bc3ae65a"), Text = "Upload", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = new Guid("c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"), Text = "Textbox multiple", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -89, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-89", SortOrder = 33, UniqueId = new Guid("c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3"), Text = "Textarea", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -88, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-88", SortOrder = 32, UniqueId = new Guid("0cc0eba1-9960-42c9-bf9b-60e150b429ae"), Text = "Textstring", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -87, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-87", SortOrder = 4, UniqueId = new Guid("ca90c950-0aff-4e72-b976-a30b1ac57dad"), Text = "Richtext editor", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = new Guid("2e6d3631-066e-44b8-aec4-96f09099b2b5"), Text = "Numeric", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
@@ -0,0 +1,38 @@
using System.Linq;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeOne
{
/// <summary>
/// This fixes the storage of user languages from the old format like en_us to en-US
/// </summary>
[Migration("7.3.1", 0, GlobalSettings.UmbracoMigrationName)]
public class UpdateUserLanguagesToIsoCode : MigrationBase
{
public UpdateUserLanguagesToIsoCode(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger)
{
}
public override void Up()
{
var userData = Context.Database.Fetch<UserDto>(new Sql().Select("*").From<UserDto>(SqlSyntax));
foreach (var user in userData.Where(x => x.UserLanguage.Contains("_")))
{
var languageParts = user.UserLanguage.Split('_');
if (languageParts.Length == 2)
{
Update.Table("umbracoUser")
.Set(new {userLanguage = languageParts[0] + "-" + languageParts[1].ToUpperInvariant()})
.Where(new {id = user.Id});
}
}
}
public override void Down()
{
}
}
}
@@ -0,0 +1,50 @@
using System.Collections.Generic;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenThreeTwo
{
/// <summary>
/// This reinserts all migrations in the migrations table to account for initial rows inserted
/// on creation without identity enabled.
/// </summary>
[Migration("7.3.2", 0, GlobalSettings.UmbracoMigrationName)]
public class EnsureMigrationsTableIdentityIsCorrect : MigrationBase
{
public EnsureMigrationsTableIdentityIsCorrect(ISqlSyntaxProvider sqlSyntax, ILogger logger) : base(sqlSyntax, logger)
{
}
public override void Up()
{
// Due to the delayed execution of migrations, we have to wrap this code in Execute.Code to ensure the previous
// migration steps (esp. creating the migrations table) have completed before trying to fetch migrations from
// this table.
List<MigrationDto> migrations = null;
Execute.Code(db =>
{
migrations = Context.Database.Fetch<MigrationDto>(new Sql().Select("*").From<MigrationDto>(SqlSyntax));
return string.Empty;
});
Delete.FromTable("umbracoMigration").AllRows();
Execute.Code(database =>
{
if (migrations != null)
{
foreach (var migration in migrations)
{
database.Insert("umbracoMigration", "id", true,
new {name = migration.Name, createDate = migration.CreateDate, version = migration.Version});
}
}
return string.Empty;
});
}
public override void Down()
{
}
}
}
@@ -28,37 +28,38 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSixZeroOne
{
if (database != null)
{
//Fetch all PropertyTypes that belongs to a PropertyTypeGroup
//Fetch all PropertyTypes that belongs to a PropertyTypeGroup
//NOTE: We are writing the full query because we've added a column to the PropertyTypeDto in later versions so one of the columns
// won't exist yet
var propertyTypes = database.Fetch<PropertyTypeDto>("SELECT * FROM cmsPropertyType WHERE propertyTypeGroupId > 0");
//NOTE: We're using dynamic to avoid having this migration fail due to the UniqueId column added in 7.3 (this column is not added
// in the table yet and will make the mapping of done by Fetch fail when the actual type is used here).
var propertyTypes = database.Fetch<dynamic>("SELECT * FROM cmsPropertyType WHERE propertyTypeGroupId > 0");
var propertyGroups = database.Fetch<PropertyTypeGroupDto>("WHERE id > 0");
foreach (var propertyType in propertyTypes)
{
//Get the PropertyTypeGroup that the current PropertyType references
var parentPropertyTypeGroup = propertyGroups.FirstOrDefault(x => x.Id == propertyType.PropertyTypeGroupId);
var parentPropertyTypeGroup = propertyGroups.FirstOrDefault(x => x.Id == propertyType.propertyTypeGroupId);
if (parentPropertyTypeGroup != null)
{
//If the ContentType is the same on the PropertyType and the PropertyTypeGroup the group is valid and we skip to the next
if (parentPropertyTypeGroup.ContentTypeNodeId == propertyType.ContentTypeId) continue;
if (parentPropertyTypeGroup.ContentTypeNodeId == propertyType.contentTypeId) continue;
//Check if the 'new' PropertyTypeGroup has already been created
var existingPropertyTypeGroup =
propertyGroups.FirstOrDefault(
x =>
x.ParentGroupId == parentPropertyTypeGroup.Id && x.Text == parentPropertyTypeGroup.Text &&
x.ContentTypeNodeId == propertyType.ContentTypeId);
x.ContentTypeNodeId == propertyType.contentTypeId);
//This should ensure that we don't create duplicate groups for a single ContentType
if (existingPropertyTypeGroup == null)
{
//Create a new PropertyTypeGroup that references the parent group that the PropertyType was referencing pre-6.0.1
var propertyGroup = new PropertyTypeGroupDto
{
ContentTypeNodeId = propertyType.ContentTypeId,
ContentTypeNodeId = propertyType.contentTypeId,
ParentGroupId = parentPropertyTypeGroup.Id,
Text = parentPropertyTypeGroup.Text,
SortOrder = parentPropertyTypeGroup.SortOrder
@@ -69,19 +70,18 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSixZeroOne
propertyGroup.Id = id;
propertyGroups.Add(propertyGroup);
//Update the reference to the new PropertyTypeGroup on the current PropertyType
propertyType.PropertyTypeGroupId = id;
database.Update(propertyType);
propertyType.propertyTypeGroupId = id;
database.Update("cmsPropertyType", "id", propertyType);
}
else
{
//Update the reference to the existing PropertyTypeGroup on the current PropertyType
propertyType.PropertyTypeGroupId = existingPropertyTypeGroup.Id;
database.Update(propertyType);
//Update the reference to the existing PropertyTypeGroup on the current PropertyType
propertyType.propertyTypeGroupId = existingPropertyTypeGroup.Id;
database.Update("cmsPropertyType", "id", propertyType);
}
}
}
}
return string.Empty;
}
}
@@ -297,7 +297,7 @@ namespace Umbraco.Core.Persistence.Repositories
//If there's a GetAll zero count cache, ensure it is cleared
RuntimeCache.ClearCacheItem(GetCacheTypeKey<TEntity>());
}
catch (Exception)
catch (Exception ex)
{
//if an exception is thrown we need to remove the entry from cache, this is ONLY a work around because of the way
// that we cache entities: http://issues.umbraco.org/issue/U4-4259
@@ -682,14 +682,16 @@ namespace Umbraco.Core.Persistence.Repositories
public RenderingEngine DetermineTemplateRenderingEngine(ITemplate template)
{
var engine = _templateConfig.DefaultRenderingEngine;
if (template.Content.IsNullOrWhiteSpace() == false && MasterPageHelper.IsMasterPageSyntax(template.Content))
var viewHelper = new ViewHelper(_viewsFileSystem);
if (!viewHelper.ViewExists(template))
{
//there is a design but its definitely a webforms design
return RenderingEngine.WebForms;
if (template.Content.IsNullOrWhiteSpace() == false && MasterPageHelper.IsMasterPageSyntax(template.Content))
{
//there is a design but its definitely a webforms design and we haven't got a MVC view already for it
return RenderingEngine.WebForms;
}
}
var viewHelper = new ViewHelper(_viewsFileSystem);
var masterPageHelper = new MasterPageHelper(_masterpagesFileSystem);
switch (engine)
@@ -117,7 +117,7 @@ namespace Umbraco.Core.Persistence
public override void OnException(Exception x)
{
_logger.Info<UmbracoDatabase>(x.StackTrace);
_logger.Error<UmbracoDatabase>("Database exception occurred", x);
base.OnException(x);
}
@@ -2,6 +2,7 @@ using System;
namespace Umbraco.Core.PropertyEditors
{
/// <summary>
/// Maps a property source value to a data object.
/// </summary>
// todo: drop IPropertyEditorValueConverter support (when?).
@@ -2,6 +2,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
@@ -15,7 +16,6 @@ using Microsoft.Owin;
using Newtonsoft.Json;
using Umbraco.Core.Configuration;
using Umbraco.Core.Models.Membership;
using Microsoft.Owin;
using Umbraco.Core.Logging;
namespace Umbraco.Core.Security
@@ -157,9 +157,6 @@ namespace Umbraco.Core.Security
return new HttpContextWrapper(http).GetCurrentIdentity(authenticateRequestIfNotFound);
}
/// <summary>
/// This clears the forms authentication cookie
/// </summary>
public static void UmbracoLogout(this HttpContextBase http)
{
if (http == null) throw new ArgumentNullException("http");
@@ -170,6 +167,8 @@ namespace Umbraco.Core.Security
/// This clears the forms authentication cookie for webapi since cookies are handled differently
/// </summary>
/// <param name="response"></param>
[Obsolete("Use OWIN IAuthenticationManager.SignOut instead")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static void UmbracoLogoutWebApi(this HttpResponseMessage response)
{
if (response == null) throw new ArgumentNullException("response");
@@ -195,11 +194,8 @@ namespace Umbraco.Core.Security
response.Headers.AddCookies(new[] { authCookie, prevCookie, extLoginCookie });
}
/// <summary>
/// This adds the forms authentication cookie for webapi since cookies are handled differently
/// </summary>
/// <param name="response"></param>
/// <param name="user"></param>
[Obsolete("Use WebSecurity.SetPrincipalForRequest")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static FormsAuthenticationTicket UmbracoLoginWebApi(this HttpResponseMessage response, IUser user)
{
if (response == null) throw new ArgumentNullException("response");
@@ -250,26 +246,29 @@ namespace Umbraco.Core.Security
if (http == null) throw new ArgumentNullException("http");
new HttpContextWrapper(http).UmbracoLogout();
}
/// <summary>
/// Renews the Umbraco authentication ticket
/// This will force ticket renewal in the OWIN pipeline
/// </summary>
/// <param name="http"></param>
/// <returns></returns>
public static bool RenewUmbracoAuthTicket(this HttpContextBase http)
{
if (http == null) throw new ArgumentNullException("http");
return RenewAuthTicket(http,
UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName,
UmbracoConfig.For.UmbracoSettings().Security.AuthCookieDomain,
//Umbraco has always persisted it's original cookie for 1 day so we'll keep it that way
1440);
http.Items["umbraco-force-auth"] = true;
return true;
}
/// <summary>
/// This will force ticket renewal in the OWIN pipeline
/// </summary>
/// <param name="http"></param>
/// <returns></returns>
internal static bool RenewUmbracoAuthTicket(this HttpContext http)
{
if (http == null) throw new ArgumentNullException("http");
return new HttpContextWrapper(http).RenewUmbracoAuthTicket();
http.Items["umbraco-force-auth"] = true;
return true;
}
/// <summary>
@@ -390,8 +389,7 @@ namespace Umbraco.Core.Security
//ensure there's def an expired cookie
http.Response.Cookies.Add(new HttpCookie(c) { Expires = DateTime.Now.AddYears(-1) });
}
}
}
}
private static FormsAuthenticationTicket GetAuthTicket(this HttpContextBase http, string cookieName)
@@ -432,51 +430,6 @@ namespace Umbraco.Core.Security
return FormsAuthentication.Decrypt(formsCookie);
}
/// <summary>
/// Renews the forms authentication ticket & cookie
/// </summary>
/// <param name="http"></param>
/// <param name="cookieName"></param>
/// <param name="cookieDomain"></param>
/// <param name="minutesPersisted"></param>
/// <returns>true if there was a ticket to renew otherwise false if there was no ticket</returns>
private static bool RenewAuthTicket(this HttpContextBase http, string cookieName, string cookieDomain, int minutesPersisted)
{
if (http == null) throw new ArgumentNullException("http");
//get the ticket
var ticket = GetAuthTicket(http, cookieName);
//renew the ticket
var renewed = FormsAuthentication.RenewTicketIfOld(ticket);
if (renewed == null)
{
return false;
}
//get the request cookie to get it's expiry date,
//NOTE: this will never be null becaues we already do this
// check in teh GetAuthTicket.
var formsCookie = http.Request.Cookies[cookieName];
//encrypt it
var hash = FormsAuthentication.Encrypt(renewed);
//write it to the response
var cookie = new HttpCookie(cookieName, hash)
{
Expires = DateTime.Now.AddMinutes(minutesPersisted),
Domain = cookieDomain
};
if (GlobalSettings.UseSSL)
cookie.Secure = true;
//ensure http only, this should only be able to be accessed via the server
cookie.HttpOnly = true;
//rewrite the cooke
http.Response.Cookies.Set(cookie);
return true;
}
/// <summary>
/// Creates a custom FormsAuthentication ticket with the data specified
/// </summary>
@@ -1,12 +1,38 @@
using System;
using System.Globalization;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.Security
{
public class BackOfficeCookieAuthenticationProvider : CookieAuthenticationProvider
{
public override void ResponseSignOut(CookieResponseSignOutContext context)
{
base.ResponseSignOut(context);
//Make sure the definitely all of these cookies are cleared when signing out with cookies
context.Response.Cookies.Append(UmbracoConfig.For.UmbracoSettings().Security.AuthCookieName, "", new CookieOptions
{
Expires = DateTime.Now.AddYears(-1),
Path = "/"
});
context.Response.Cookies.Append(Constants.Web.PreviewCookieName, "", new CookieOptions
{
Expires = DateTime.Now.AddYears(-1),
Path = "/"
});
context.Response.Cookies.Append(Constants.Security.BackOfficeExternalCookieName, "", new CookieOptions
{
Expires = DateTime.Now.AddYears(-1),
Path = "/"
});
}
/// <summary>
/// Ensures that the culture is set correctly for the current back office user
/// </summary>
@@ -53,6 +53,11 @@ namespace Umbraco.Core.Security
switch (result)
{
case SignInStatus.Success:
_logger.WriteCore(TraceEventType.Information, 0,
string.Format(
"User: {0} logged in from IP address {1}",
userName,
_request.RemoteIpAddress), null, null);
break;
case SignInStatus.LockedOut:
_logger.WriteCore(TraceEventType.Information, 0,
@@ -1,6 +1,7 @@
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Security;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
@@ -9,8 +10,6 @@ using Umbraco.Core.Services;
namespace Umbraco.Core.Security
{
/// <summary>
/// Default back office user manager
/// </summary>
@@ -21,6 +20,18 @@ namespace Umbraco.Core.Security
{
}
public BackOfficeUserManager(
IUserStore<BackOfficeIdentityUser, int> store,
IdentityFactoryOptions<BackOfficeUserManager> options,
MembershipProviderBase membershipProvider)
: base(store)
{
if (options == null) throw new ArgumentNullException("options");
var manager = new BackOfficeUserManager(store);
InitUserManager(manager, membershipProvider, options);
}
#region Static Create methods
/// <summary>
/// Creates a BackOfficeUserManager instance with all default options and the default BackOfficeUserManager
/// </summary>
@@ -40,8 +51,8 @@ namespace Umbraco.Core.Security
if (externalLoginService == null) throw new ArgumentNullException("externalLoginService");
var manager = new BackOfficeUserManager(new BackOfficeUserStore(userService, externalLoginService, membershipProvider));
return InitUserManager(manager, membershipProvider, options);
manager.InitUserManager(manager, membershipProvider, options);
return manager;
}
/// <summary>
@@ -56,13 +67,10 @@ namespace Umbraco.Core.Security
BackOfficeUserStore customUserStore,
MembershipProviderBase membershipProvider)
{
if (options == null) throw new ArgumentNullException("options");
if (customUserStore == null) throw new ArgumentNullException("customUserStore");
var manager = new BackOfficeUserManager(customUserStore);
return InitUserManager(manager, membershipProvider, options);
}
var manager = new BackOfficeUserManager(customUserStore, options, membershipProvider);
return manager;
}
#endregion
/// <summary>
/// Initializes the user manager with the correct options
@@ -71,7 +79,7 @@ namespace Umbraco.Core.Security
/// <param name="membershipProvider"></param>
/// <param name="options"></param>
/// <returns></returns>
private static BackOfficeUserManager InitUserManager(BackOfficeUserManager manager, MembershipProviderBase membershipProvider, IdentityFactoryOptions<BackOfficeUserManager> options)
protected void InitUserManager(BackOfficeUserManager manager, MembershipProviderBase membershipProvider, IdentityFactoryOptions<BackOfficeUserManager> options)
{
// Configure validation logic for usernames
manager.UserValidator = new UserValidator<BackOfficeIdentityUser, int>(manager)
@@ -125,10 +133,10 @@ namespace Umbraco.Core.Security
//});
//manager.EmailService = new EmailService();
//manager.SmsService = new SmsService();
return manager;
//manager.SmsService = new SmsService();
}
}
/// <summary>
@@ -171,5 +179,44 @@ namespace Umbraco.Core.Security
}
#endregion
/// <summary>
/// Logic used to validate a username and password
/// </summary>
/// <param name="user"></param>
/// <param name="password"></param>
/// <returns></returns>
/// <remarks>
/// By default this uses the standard ASP.Net Identity approach which is:
/// * Get password store
/// * Call VerifyPasswordAsync with the password store + user + password
/// * Uses the PasswordHasher.VerifyHashedPassword to compare the stored password
///
/// In some cases people want simple custom control over the username/password check, for simplicity
/// sake, developers would like the users to simply validate against an LDAP directory but the user
/// data remains stored inside of Umbraco.
/// See: http://issues.umbraco.org/issue/U4-7032 for the use cases.
///
/// We've allowed this check to be overridden with a simple callback so that developers don't actually
/// have to implement/override this class.
/// </remarks>
public async override Task<bool> CheckPasswordAsync(T user, string password)
{
if (BackOfficeUserPasswordChecker != null)
{
var result = await BackOfficeUserPasswordChecker.CheckPasswordAsync(user, password);
//if the result indicates to not fallback to the default, then return true if the credentials are valid
if (result != BackOfficeUserPasswordCheckerResult.FallbackToDefaultChecker)
{
return result == BackOfficeUserPasswordCheckerResult.ValidCredentials;
}
}
//use the default behavior
return await base.CheckPasswordAsync(user, password);
}
/// <summary>
/// Gets/sets the default back office user password checker
/// </summary>
public IBackOfficeUserPasswordChecker BackOfficeUserPasswordChecker { get; set; }
}
}
@@ -0,0 +1,12 @@
namespace Umbraco.Core.Security
{
/// <summary>
/// The result returned from the IBackOfficeUserPasswordChecker
/// </summary>
public enum BackOfficeUserPasswordCheckerResult
{
ValidCredentials,
InvalidCredentials,
FallbackToDefaultChecker
}
}
@@ -0,0 +1,14 @@
using System.Threading.Tasks;
using Umbraco.Core.Models.Identity;
namespace Umbraco.Core.Security
{
/// <summary>
/// Used by the BackOfficeUserManager to check the username/password which allows for developers to more easily
/// set the logic for this procedure.
/// </summary>
public interface IBackOfficeUserPasswordChecker
{
Task<BackOfficeUserPasswordCheckerResult> CheckPasswordAsync(BackOfficeIdentityUser user, string password);
}
}
+12 -1
View File
@@ -152,6 +152,9 @@ namespace Umbraco.Core.Services
{
var contentType = FindContentTypeByAlias(contentTypeAlias);
var content = new Content(name, parentId, contentType);
var parent = GetById(content.ParentId);
content.Path = string.Concat(parent.IfNotNull(x => x.Path, content.ParentId.ToString()), ",", content.Id);
if (Creating.IsRaisedEventCancelled(new NewEventArgs<IContent>(content, contentTypeAlias, parentId), this))
{
@@ -190,8 +193,11 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IContent"/></returns>
public IContent CreateContent(string name, IContent parent, string contentTypeAlias, int userId = 0)
{
if (parent == null) throw new ArgumentNullException("parent");
var contentType = FindContentTypeByAlias(contentTypeAlias);
var content = new Content(name, parent, contentType);
content.Path = string.Concat(parent.Path, ",", content.Id);
if (Creating.IsRaisedEventCancelled(new NewEventArgs<IContent>(content, contentTypeAlias, parent), this))
{
@@ -225,7 +231,7 @@ namespace Umbraco.Core.Services
public IContent CreateContentWithIdentity(string name, int parentId, string contentTypeAlias, int userId = 0)
{
var contentType = FindContentTypeByAlias(contentTypeAlias);
var content = new Content(name, parentId, contentType);
var content = new Content(name, parentId, contentType);
//NOTE: I really hate the notion of these Creating/Created events - they are so inconsistent, I've only just found
// out that in these 'WithIdentity' methods, the Saving/Saved events were not fired, wtf. Anyways, they're added now.
@@ -276,6 +282,8 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IContent"/></returns>
public IContent CreateContentWithIdentity(string name, IContent parent, string contentTypeAlias, int userId = 0)
{
if (parent == null) throw new ArgumentNullException("parent");
var contentType = FindContentTypeByAlias(contentTypeAlias);
var content = new Content(name, parent, contentType);
@@ -445,6 +453,9 @@ namespace Umbraco.Core.Services
/// <returns>An Enumerable list of <see cref="IContent"/> objects</returns>
public IEnumerable<IContent> GetAncestors(IContent content)
{
//null check otherwise we get exceptions
if (content.Path.IsNullOrWhiteSpace()) return Enumerable.Empty<IContent>();
var ids = content.Path.Split(',').Where(x => x != Constants.System.Root.ToInvariantString() && x != content.Id.ToString(CultureInfo.InvariantCulture)).Select(int.Parse).ToArray();
if (ids.Any() == false)
return new List<IContent>();
@@ -100,6 +100,8 @@ namespace Umbraco.Core.Services
xml.Add(new XAttribute("loginName", member.Username));
xml.Add(new XAttribute("email", member.Email));
xml.Add(new XAttribute("icon", member.ContentType.Icon));
return xml;
}
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Umbraco.Core.Models;
using Umbraco.Core.Security;
@@ -42,14 +43,18 @@ namespace Umbraco.Core.Services
/// <returns></returns>
Attempt<PublicAccessEntry> IsProtected(string contentPath);
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use AddRule instead, this method will be removed in future versions")]
Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>> AddOrUpdateRule(IContent content, string ruleType, string ruleValue);
/// <summary>
/// Adds/updates a rule, if an entry doesn't exist one will be created with the new rule
/// Adds a rule if the entry doesn't already exist
/// </summary>
/// <param name="content"></param>
/// <param name="ruleType"></param>
/// <param name="newRuleValue"></param>
/// <param name="ruleValue"></param>
/// <returns></returns>
Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>> AddOrUpdateRule(IContent content, string ruleType, string newRuleValue);
Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>> AddRule(IContent content, string ruleType, string ruleValue);
/// <summary>
/// Removes a rule
@@ -63,6 +63,8 @@ namespace Umbraco.Core.Services
{
var mediaType = FindMediaTypeByAlias(mediaTypeAlias);
var media = new Models.Media(name, parentId, mediaType);
var parent = GetById(media.ParentId);
media.Path = string.Concat(parent.IfNotNull(x => x.Path, media.ParentId.ToString()), ",", media.Id);
if (Creating.IsRaisedEventCancelled(new NewEventArgs<IMedia>(media, mediaTypeAlias, parentId), this))
{
@@ -95,8 +97,12 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IMedia"/></returns>
public IMedia CreateMedia(string name, IMedia parent, string mediaTypeAlias, int userId = 0)
{
if (parent == null) throw new ArgumentNullException("parent");
var mediaType = FindMediaTypeByAlias(mediaTypeAlias);
var media = new Models.Media(name, parent, mediaType);
media.Path = string.Concat(parent.Path, ",", media.Id);
if (Creating.IsRaisedEventCancelled(new NewEventArgs<IMedia>(media, mediaTypeAlias, parent), this))
{
media.WasCancelled = true;
@@ -184,6 +190,8 @@ namespace Umbraco.Core.Services
/// <returns><see cref="IMedia"/></returns>
public IMedia CreateMediaWithIdentity(string name, IMedia parent, string mediaTypeAlias, int userId = 0)
{
if (parent == null) throw new ArgumentNullException("parent");
var mediaType = FindMediaTypeByAlias(mediaTypeAlias);
var media = new Models.Media(name, parent, mediaType);
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Umbraco.Core.Events;
using Umbraco.Core.Logging;
@@ -104,14 +105,21 @@ namespace Umbraco.Core.Services
return Attempt.If(result != null, result);
}
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use AddRule instead, this method will be removed in future versions")]
public Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>> AddOrUpdateRule(IContent content, string ruleType, string ruleValue)
{
return AddRule(content, ruleType, ruleValue);
}
/// <summary>
/// Adds/updates a rule
/// Adds a rule
/// </summary>
/// <param name="content"></param>
/// <param name="ruleType"></param>
/// <param name="newRuleValue"></param>
/// <param name="ruleValue"></param>
/// <returns></returns>
public Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>> AddOrUpdateRule(IContent content, string ruleType, string newRuleValue)
public Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>> AddRule(IContent content, string ruleType, string ruleValue)
{
var evtMsgs = EventMessagesFactory.Get();
var uow = UowProvider.GetUnitOfWork();
@@ -121,15 +129,16 @@ namespace Umbraco.Core.Services
if (entry == null)
return Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>>.Fail();
var existingRule = entry.Rules.FirstOrDefault(x => x.RuleType == ruleType);
var existingRule = entry.Rules.FirstOrDefault(x => x.RuleType == ruleType && x.RuleValue == ruleValue);
if (existingRule == null)
{
entry.AddRule(newRuleValue, ruleType);
entry.AddRule(ruleValue, ruleType);
}
else
{
existingRule.RuleType = ruleType;
existingRule.RuleValue = newRuleValue;
//If they are both the same already then there's nothing to update, exit
return Attempt<OperationStatus<PublicAccessEntry, OperationStatusType>>.Succeed(
new OperationStatus<PublicAccessEntry, OperationStatusType>(entry, OperationStatusType.Success, evtMsgs));
}
if (Saving.IsRaisedEventCancelled(
+3
View File
@@ -146,6 +146,9 @@ namespace Umbraco.Core.Services
IsLockedOut = false,
IsApproved = true
};
//adding default sections content and media
user.AddAllowedSection("content");
user.AddAllowedSection("media");
if (SavingUser.IsRaisedEventCancelled(new SaveEventArgs<IUser>(user), this))
return user;
@@ -187,7 +187,13 @@ namespace Umbraco.Core.Sync
using (_profilingLogger.DebugDuration<DatabaseServerMessenger>("Syncing from database..."))
{
ProcessDatabaseInstructions();
PruneOldInstructions();
switch (_appContext.GetCurrentServerRole())
{
case ServerRole.Single:
case ServerRole.Master:
PruneOldInstructions();
break;
}
}
}
finally
@@ -214,9 +220,9 @@ namespace Umbraco.Core.Sync
// FIXME not true if we're running on a background thread, assuming we can?
var sql = new Sql().Select("*")
.From<CacheInstructionDto>()
.From<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax)
.Where<CacheInstructionDto>(dto => dto.Id > _lastId)
.OrderBy<CacheInstructionDto>(dto => dto.Id);
.OrderBy<CacheInstructionDto>(dto => dto.Id, _appContext.DatabaseContext.SqlSyntax);
var dtos = _appContext.DatabaseContext.Database.Fetch<CacheInstructionDto>(sql);
if (dtos.Count <= 0) return;
@@ -288,7 +294,7 @@ namespace Umbraco.Core.Sync
private void EnsureInstructions()
{
var sql = new Sql().Select("*")
.From<CacheInstructionDto>()
.From<CacheInstructionDto>(_appContext.DatabaseContext.SqlSyntax)
.Where<CacheInstructionDto>(dto => dto.Id == _lastId);
var dtos = _appContext.DatabaseContext.Database.Fetch<CacheInstructionDto>(sql);
+6 -1
View File
@@ -15,7 +15,12 @@ namespace Umbraco.Core.Sync
// but at the moment it is exposed in CacheRefresher webservice
// so for the time being we keep it as-is for backward compatibility reasons
// need the public one so it can be de-serialized
// need this public, parameter-less constructor so the web service messenger
// can de-serialize the instructions it receives
public RefreshInstruction()
{ }
// need this public one so it can be de-serialized - used by the Json thing
// otherwise, should use GetInstructions(...)
public RefreshInstruction(Guid refresherId, RefreshMethodType refreshType, Guid guidId, int intId, string jsonIds, string jsonPayload)
{
+51
View File
@@ -0,0 +1,51 @@
using System.Globalization;
using System.Threading;
namespace Umbraco.Core
{
static class ThreadExtensions
{
public static void SanitizeThreadCulture(this Thread thread)
{
// get the current culture
var currentCulture = CultureInfo.CurrentCulture;
// at the top of any culture should be the invariant culture - find it
// doing an .Equals comparison ensure that we *will* find it and not loop
// endlessly
var invariantCulture = currentCulture;
while (invariantCulture.Equals(CultureInfo.InvariantCulture) == false)
invariantCulture = invariantCulture.Parent;
// now that invariant culture should be the same object as CultureInfo.InvariantCulture
// yet for some reasons, sometimes it is not - and this breaks anything that loops on
// culture.Parent until a reference equality to CultureInfo.InvariantCulture. See, for
// example, the following code in PerformanceCounterLib.IsCustomCategory:
//
// CultureInfo culture = CultureInfo.CurrentCulture;
// while (culture != CultureInfo.InvariantCulture)
// {
// library = GetPerformanceCounterLib(machine, culture);
// if (library.IsCustomCategory(category))
// return true;
// culture = culture.Parent;
// }
//
// The reference comparisons never succeeds, hence the loop never ends, and the
// application hangs.
//
// granted, that comparison should probably be a .Equals comparison, but who knows
// how many times the framework assumes that it can do a reference comparison? So,
// better fix the cultures.
if (ReferenceEquals(invariantCulture, CultureInfo.InvariantCulture))
return;
// if we do not have equality, fix cultures by replacing them with a culture with
// the same name, but obtained here and now, with a proper invariant top culture
thread.CurrentCulture = CultureInfo.GetCultureInfo(thread.CurrentCulture.Name);
thread.CurrentUICulture = CultureInfo.GetCultureInfo(thread.CurrentUICulture.Name);
}
}
}
+7 -1
View File
@@ -86,7 +86,7 @@
</Reference>
<Reference Include="MySql.Data">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\MySql.Data.6.9.7\lib\net45\MySql.Data.dll</HintPath>
<HintPath>..\packages\MySql.Data.6.9.8\lib\net45\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.6.0.8\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -404,6 +404,8 @@
<Compile Include="Persistence\Mappers\AccessMapper.cs" />
<Compile Include="Persistence\Mappers\DomainMapper.cs" />
<Compile Include="Persistence\Mappers\MigrationEntryMapper.cs" />
<Compile Include="Persistence\Mappers\TaskTypeMapper.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeTwo\EnsureMigrationsTableIdentityIsCorrect.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeZero\AddExternalLoginsTable.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeZero\AddForeignKeysForLanguageAndDictionaryTables.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeZero\AddServerRegistrationColumnsAndLock.cs" />
@@ -435,6 +437,7 @@
<Compile Include="Media\Exif\TIFFHeader.cs" />
<Compile Include="Media\Exif\TIFFStrip.cs" />
<Compile Include="Media\Exif\Utility.cs" />
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeOne\UpdateUserLanguagesToIsoCode.cs" />
<Compile Include="Persistence\RecordPersistenceType.cs" />
<Compile Include="Persistence\Relators\AccessRulesRelator.cs" />
<Compile Include="Persistence\Repositories\AuditRepository.cs" />
@@ -462,7 +465,9 @@
<Compile Include="Security\BackOfficeCookieAuthenticationProvider.cs" />
<Compile Include="Security\BackOfficeSignInManager.cs" />
<Compile Include="Security\BackOfficeUserManager.cs" />
<Compile Include="Security\BackOfficeUserPasswordCheckerResult.cs" />
<Compile Include="Security\BackOfficeUserStore.cs" />
<Compile Include="Security\IBackOfficeUserPasswordChecker.cs" />
<Compile Include="Security\MembershipPasswordHasher.cs" />
<Compile Include="SemVersionExtensions.cs" />
<Compile Include="ServiceProviderExtensions.cs" />
@@ -1275,6 +1280,7 @@
<Compile Include="Sync\ApplicationUrlHelper.cs" />
<Compile Include="Sync\RefreshMethodType.cs" />
<Compile Include="Sync\ServerMessengerBase.cs" />
<Compile Include="ThreadExtensions.cs" />
<Compile Include="TopologicalSorter.cs" />
<Compile Include="Strings\DefaultUrlSegmentProvider.cs" />
<Compile Include="Strings\IUrlSegmentProvider.cs" />
@@ -2,6 +2,7 @@
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Threading;
using System.Web;
using System.Web.Hosting;
using log4net;
@@ -64,6 +65,7 @@ namespace Umbraco.Core
/// <param name="e"></param>
protected void Application_Start(object sender, EventArgs e)
{
Thread.CurrentThread.SanitizeThreadCulture();
StartApplication(sender, e);
}
+1 -1
View File
@@ -14,7 +14,7 @@
<package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net45" />
<package id="MiniProfiler" version="2.1.0" targetFramework="net45" />
<package id="MySql.Data" version="6.9.7" targetFramework="net45" />
<package id="MySql.Data" version="6.9.8" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="semver" version="1.1.2" targetFramework="net45" />
+2 -2
View File
@@ -56,7 +56,7 @@
<appSettings>
<add key="umbracoConfigurationStatus" value="6.0.0" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoReservedPaths" value="~/install/" />
<add key="umbracoPath" value="~/umbraco" />
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
<add key="umbracoUseDirectoryUrls" value="false" />
@@ -203,4 +203,4 @@
</assemblyBinding>
</runtime>
</configuration>
</configuration>
@@ -28,7 +28,7 @@
</control>
</tab>
<tab caption="Examine Management">
<control>/umbraco/dashboard/ExamineManagement.ascx</control>
<control>dashboard/ExamineManagement.ascx</control>
</tab>
</section>
@@ -85,7 +85,7 @@
</control>
</tab>
<tab caption="Last Edits">
<control addPanel="true" MaxRecords="30">/umbraco/dashboard/latestEdits.ascx</control>
<control addPanel="true" MaxRecords="30">dashboard/latestEdits.ascx</control>
</tab>
<tab caption="Change Password">
<control addPanel="true">
@@ -104,11 +104,11 @@
views/dashboard/members/membersdashboardintro.html
</control>
<control showOnce="true" addPanel="true" panelCaption="">
/umbraco/members/membersearch.ascx
members/membersearch.ascx
</control>
<control showOnce="true" addPanel="true" panelCaption="">
views/dashboard/members/membersdashboardvideos.html
</control>
</tab>
</section>
</dashBoard>
</dashBoard>
@@ -173,7 +173,8 @@ namespace Umbraco.Tests.Logging
Console.WriteLine("Flushed {0} events during shutdown", numberLoggedAfterClose - numberLoggedBeforeClose);
}
[Test, Explicit("Long-running")]
[NUnit.Framework.Ignore("Keeps failing very randomly")]
[Test]
public void WillShutdownIfBufferCannotBeFlushedFastEnough()
{
const int testSize = 250;
@@ -482,7 +482,7 @@ ALTER TABLE umbracoUser2NodePermission ADD CONSTRAINT PK_umbracoUser2NodePermiss
INSERT INTO umbracoNode (id, trashed, parentID, nodeUser, level, path, sortOrder, uniqueID, text, nodeObjectType, createDate) VALUES
(-92, 0, -1, 0, 11, '-1,-92', 37, 'f0bc4bfb-b499-40d6-ba86-058885a5178c', 'Label', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-90, 0, -1, 0, 11, '-1,-90', 35, '84c6b441-31df-4ffe-b67e-67d5bc3ae65a', 'Upload', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-89, 0, -1, 0, 11, '-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', 'Textbox multiple', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-89, 0, -1, 0, 11, '-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', 'Textarea', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-88, 0, -1, 0, 11, '-1,-88', 33, '0cc0eba1-9960-42c9-bf9b-60e150b429ae', 'Textstring', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-87, 0, -1, 0, 11, '-1,-87', 32, 'ca90c950-0aff-4e72-b976-a30b1ac57dad', 'Richtext editor', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
(-51, 0, -1, 0, 11, '-1,-51', 4, '2e6d3631-066e-44b8-aec4-96f09099b2b5', 'Numeric', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '2004/09/30 14:01:49.920'),
@@ -624,7 +624,7 @@ ALTER TABLE [umbracoNode] DROP CONSTRAINT [FK_umbracoNode_umbracoNode]
SET IDENTITY_INSERT [umbracoNode] ON
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-92, 0, -1, 0, 11, N'-1,-92', 37, 'f0bc4bfb-b499-40d6-ba86-058885a5178c', N'Label', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-90, 0, -1, 0, 11, N'-1,-90', 35, '84c6b441-31df-4ffe-b67e-67d5bc3ae65a', N'Upload', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-89, 0, -1, 0, 11, N'-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', N'Textbox multiple', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-89, 0, -1, 0, 11, N'-1,-89', 34, 'c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3', N'Textarea', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-88, 0, -1, 0, 11, N'-1,-88', 33, '0cc0eba1-9960-42c9-bf9b-60e150b429ae', N'Textstring', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-87, 0, -1, 0, 11, N'-1,-87', 32, 'ca90c950-0aff-4e72-b976-a30b1ac57dad', N'Richtext editor', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
INSERT INTO [umbracoNode] ([id], [trashed], [parentID], [nodeUser], [level], [path], [sortOrder], [uniqueID], [text], [nodeObjectType], [createDate]) VALUES (-51, 0, -1, 0, 11, N'-1,-51', 4, '2e6d3631-066e-44b8-aec4-96f09099b2b5', N'Numeric', '30a2a501-1978-4ddb-a57b-f7efed43ba3c', '20040930 14:01:49.920')
@@ -0,0 +1,173 @@
using System;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Moq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.Logging;
using Umbraco.Core.Profiling;
using Umbraco.Web;
using Umbraco.Web.Models;
using Umbraco.Web.Mvc;
using Umbraco.Web.Routing;
using Umbraco.Web.Security;
namespace Umbraco.Tests.Mvc
{
[TestFixture]
public class RenderIndexActionSelectorAttributeTests
{
private MethodInfo GetRenderMvcControllerIndexMethodFromCurrentType(Type currType)
{
return currType.GetMethods().Single(x =>
{
if (x.Name != "Index") return false;
if (x.ReturnParameter == null || x.ReturnParameter.ParameterType != typeof (ActionResult)) return false;
var p = x.GetParameters();
if (p.Length != 1) return false;
if (p[0].ParameterType != typeof (RenderModel)) return false;
return true;
});
}
[Test]
public void Matches_Default_Index()
{
var attr = new RenderIndexActionSelectorAttribute();
var req = new RequestContext();
var appCtx = new ApplicationContext(
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
var umbCtx = UmbracoContext.EnsureContext(
Mock.Of<HttpContextBase>(),
appCtx,
new Mock<WebSecurity>(null, null).Object,
Mock.Of<IUmbracoSettingsSection>(),
Enumerable.Empty<IUrlProvider>(),
true);
var ctrl = new MatchesDefaultIndexController(umbCtx);
var controllerCtx = new ControllerContext(req, ctrl);
var result = attr.IsValidForRequest(controllerCtx,
GetRenderMvcControllerIndexMethodFromCurrentType(ctrl.GetType()));
Assert.IsTrue(result);
}
[Test]
public void Matches_Overriden_Index()
{
var attr = new RenderIndexActionSelectorAttribute();
var req = new RequestContext();
var appCtx = new ApplicationContext(
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
var umbCtx = UmbracoContext.EnsureContext(
Mock.Of<HttpContextBase>(),
appCtx,
new Mock<WebSecurity>(null, null).Object,
Mock.Of<IUmbracoSettingsSection>(),
Enumerable.Empty<IUrlProvider>(),
true);
var ctrl = new MatchesOverriddenIndexController(umbCtx);
var controllerCtx = new ControllerContext(req, ctrl);
var result = attr.IsValidForRequest(controllerCtx,
GetRenderMvcControllerIndexMethodFromCurrentType(ctrl.GetType()));
Assert.IsTrue(result);
}
[Test]
public void Matches_Custom_Index()
{
var attr = new RenderIndexActionSelectorAttribute();
var req = new RequestContext();
var appCtx = new ApplicationContext(
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
var umbCtx = UmbracoContext.EnsureContext(
Mock.Of<HttpContextBase>(),
appCtx,
new Mock<WebSecurity>(null, null).Object,
Mock.Of<IUmbracoSettingsSection>(),
Enumerable.Empty<IUrlProvider>(),
true);
var ctrl = new MatchesCustomIndexController(umbCtx);
var controllerCtx = new ControllerContext(req, ctrl);
var result = attr.IsValidForRequest(controllerCtx,
GetRenderMvcControllerIndexMethodFromCurrentType(ctrl.GetType()));
Assert.IsFalse(result);
}
[Test]
public void Matches_Async_Index_Same_Signature()
{
var attr = new RenderIndexActionSelectorAttribute();
var req = new RequestContext();
var appCtx = new ApplicationContext(
CacheHelper.CreateDisabledCacheHelper(),
new ProfilingLogger(Mock.Of<ILogger>(), Mock.Of<IProfiler>()));
var umbCtx = UmbracoContext.EnsureContext(
Mock.Of<HttpContextBase>(),
appCtx,
new Mock<WebSecurity>(null, null).Object,
Mock.Of<IUmbracoSettingsSection>(),
Enumerable.Empty<IUrlProvider>(),
true);
var ctrl = new MatchesAsyncIndexController(umbCtx);
var controllerCtx = new ControllerContext(req, ctrl);
var result = attr.IsValidForRequest(controllerCtx,
GetRenderMvcControllerIndexMethodFromCurrentType(ctrl.GetType()));
Assert.IsFalse(result);
}
public class MatchesDefaultIndexController : RenderMvcController
{
public MatchesDefaultIndexController(UmbracoContext umbracoContext) : base(umbracoContext)
{
}
}
public class MatchesOverriddenIndexController : RenderMvcController
{
public MatchesOverriddenIndexController(UmbracoContext umbracoContext) : base(umbracoContext)
{
}
public override ActionResult Index(RenderModel model)
{
return base.Index(model);
}
}
public class MatchesCustomIndexController : RenderMvcController
{
public MatchesCustomIndexController(UmbracoContext umbracoContext) : base(umbracoContext)
{
}
public ActionResult Index(RenderModel model, int page)
{
return base.Index(model);
}
}
public class MatchesAsyncIndexController : RenderMvcController
{
public MatchesAsyncIndexController(UmbracoContext umbracoContext) : base(umbracoContext)
{
}
public new async Task<ActionResult> Index(RenderModel model)
{
return await Task.FromResult(base.Index(model));
}
}
}
}
@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Web.Mvc;
using NUnit.Framework;
@@ -268,7 +268,7 @@ namespace Umbraco.Tests.Plugins
public void Resolves_Assigned_Mappers()
{
var foundTypes1 = _manager.ResolveAssignedMapperTypes();
Assert.AreEqual(27, foundTypes1.Count());
Assert.AreEqual(28, foundTypes1.Count());
}
[Test]
@@ -141,6 +141,20 @@ namespace Umbraco.Tests.Services
Assert.AreEqual(20, contentService.CountDescendants(parent.Id));
}
[Test]
public void GetAncestors_Returns_Empty_List_When_Path_Is_Null()
{
// Arrange
var contentService = ServiceContext.ContentService;
// Act
var current = new Mock<IContent>();
var res = contentService.GetAncestors(current.Object);
// Assert
Assert.IsEmpty(res);
}
[Test]
public void Tags_For_Entity_Are_Not_Exposed_Via_Tag_Api_When_Content_Is_Recycled()
{
@@ -1163,6 +1163,48 @@ namespace Umbraco.Tests.Services
Assert.That(propertyGroup.ParentId.HasValue, Is.False);
}
[Test]
public void Can_Remove_PropertyGroup_Without_Removing_Property_Types()
{
var service = ServiceContext.ContentTypeService;
var basePage = (IContentType)MockedContentTypes.CreateBasicContentType();
basePage.AddPropertyGroup("Content");
basePage.AddPropertyGroup("Meta");
service.Save(basePage);
var authorPropertyType = new PropertyType(Constants.PropertyEditors.TextboxAlias, DataTypeDatabaseType.Ntext, "author")
{
Name = "Author",
Description = "",
Mandatory = false,
SortOrder = 1,
DataTypeDefinitionId = -88
};
var authorAdded = basePage.AddPropertyType(authorPropertyType, "Content");
var titlePropertyType = new PropertyType(Constants.PropertyEditors.TextboxAlias, DataTypeDatabaseType.Ntext, "title")
{
Name = "Title",
Description = "",
Mandatory = false,
SortOrder = 1,
DataTypeDefinitionId = -88
};
var titleAdded = basePage.AddPropertyType(authorPropertyType, "Meta");
service.Save(basePage);
basePage = service.GetContentType(basePage.Id);
var totalPt = basePage.PropertyTypes.Count();
basePage.RemovePropertyGroup("Content");
service.Save(basePage);
basePage = service.GetContentType(basePage.Id);
Assert.AreEqual(totalPt, basePage.PropertyTypes.Count());
}
[Test]
public void Can_Add_PropertyGroup_With_Same_Name_On_Parent_and_Child()
{
@@ -80,7 +80,7 @@ namespace Umbraco.Tests.Services
publicAccessService.Save(entry);
// Act
var updated = publicAccessService.AddOrUpdateRule(c, "TestType2", "AnotherVal");
var updated = publicAccessService.AddRule(c, "TestType2", "AnotherVal");
//re-get
entry = publicAccessService.GetEntryForContent(c);
@@ -91,7 +91,7 @@ namespace Umbraco.Tests.Services
}
[Test]
public void Can_Update_Rule()
public void Can_Add_Multiple_Value_For_Same_Rule_Type()
{
// Arrange
var contentService = ServiceContext.ContentService;
@@ -106,21 +106,63 @@ namespace Umbraco.Tests.Services
new PublicAccessRule()
{
RuleType = "TestType",
RuleValue = "TestValue"
RuleValue = "TestVal"
},
});
publicAccessService.Save(entry);
// Act
var updated = publicAccessService.AddOrUpdateRule(c, "TestType", "AnotherVal");
var updated1 = publicAccessService.AddRule(c, "TestType", "AnotherVal1");
var updated2 = publicAccessService.AddRule(c, "TestType", "AnotherVal2");
//re-get
entry = publicAccessService.GetEntryForContent(c);
// Assert
Assert.IsTrue(updated.Success);
Assert.AreEqual(OperationStatusType.Success, updated.Result.StatusType);
Assert.AreEqual(1, entry.Rules.Count());
Assert.AreEqual("AnotherVal", entry.Rules.ElementAt(0).RuleValue);
Assert.IsTrue(updated1.Success);
Assert.IsTrue(updated2.Success);
Assert.AreEqual(OperationStatusType.Success, updated1.Result.StatusType);
Assert.AreEqual(OperationStatusType.Success, updated2.Result.StatusType);
Assert.AreEqual(3, entry.Rules.Count());
}
[Test]
public void Can_Remove_Rule()
{
// Arrange
var contentService = ServiceContext.ContentService;
var contentTypeService = ServiceContext.ContentTypeService;
var ct = MockedContentTypes.CreateSimpleContentType("blah", "Blah");
contentTypeService.Save(ct);
var c = MockedContent.CreateSimpleContent(ct, "Test", -1);
contentService.Save(c);
var publicAccessService = ServiceContext.PublicAccessService;
var entry = new PublicAccessEntry(c, c, c, new[]
{
new PublicAccessRule()
{
RuleType = "TestType",
RuleValue = "TestValue1"
},
new PublicAccessRule()
{
RuleType = "TestType",
RuleValue = "TestValue2"
},
});
publicAccessService.Save(entry);
// Act
var removed = publicAccessService.RemoveRule(c, "TestType", "TestValue1");
//re-get
entry = publicAccessService.GetEntryForContent(c);
// Assert
Assert.IsTrue(removed.Success);
Assert.AreEqual(OperationStatusType.Success, removed.Result.StatusType);
Assert.AreEqual(1, entry.Rules.Count());
Assert.AreEqual("TestValue2", entry.Rules.ElementAt(0).RuleValue);
}
}
}
@@ -398,6 +398,10 @@ namespace Umbraco.Tests.Services
var user1 = ServiceContext.UserService.CreateUserWithIdentity("test1", "test1@test.com", userType);
var result1 = ServiceContext.UserService.GetUserById((int)user1.Id);
//expect 2 sections by default
Assert.AreEqual(2, result1.AllowedSections.Count());
//adds some allowed sections
user1.AddAllowedSection("test1");
user1.AddAllowedSection("test2");
@@ -405,8 +409,9 @@ namespace Umbraco.Tests.Services
user1.AddAllowedSection("test4");
ServiceContext.UserService.Save(user1);
var result1 = ServiceContext.UserService.GetUserById((int)user1.Id);
Assert.AreEqual(4, result1.AllowedSections.Count());
result1 = ServiceContext.UserService.GetUserById((int)user1.Id);
//expect 6 sections including the two default sections
Assert.AreEqual(6, result1.AllowedSections.Count());
//simulate clearing the sections
foreach (var s in user1.AllowedSections)
@@ -419,11 +424,9 @@ namespace Umbraco.Tests.Services
ServiceContext.UserService.Save(result1);
//assert
//re-get
result1 = ServiceContext.UserService.GetUserById((int)user1.Id);
Assert.AreEqual(2, result1.AllowedSections.Count());
}
[Test]
@@ -448,7 +451,6 @@ namespace Umbraco.Tests.Services
var result2 = ServiceContext.UserService.GetUserById((int)user2.Id);
Assert.IsFalse(result1.AllowedSections.Contains("test"));
Assert.IsFalse(result2.AllowedSections.Contains("test"));
}
[Test]
@@ -546,7 +548,7 @@ namespace Umbraco.Tests.Services
Assert.That(updatedItem.StartMediaId, Is.EqualTo(originalUser.StartMediaId));
Assert.That(updatedItem.Email, Is.EqualTo(originalUser.Email));
Assert.That(updatedItem.Username, Is.EqualTo(originalUser.Username));
Assert.That(updatedItem.AllowedSections.Count(), Is.EqualTo(0));
Assert.That(updatedItem.AllowedSections.Count(), Is.EqualTo(2));
}
}
}
@@ -0,0 +1,109 @@
using Moq;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Umbraco.Core;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence.Repositories;
using Umbraco.Core.Persistence.SqlSyntax;
using Umbraco.Core.Persistence.UnitOfWork;
namespace Umbraco.Tests.Templates
{
[TestFixture]
public class TemplateRepositoryTests
{
private readonly Mock<IDatabaseUnitOfWork> _unitOfWorkMock = new Mock<IDatabaseUnitOfWork>();
private readonly Mock<CacheHelper> _cacheMock = new Mock<CacheHelper>();
private TemplateRepository _templateRepository;
private readonly Mock<IFileSystem> _viewFileSystemMock = new Mock<IFileSystem>();
private readonly Mock<IFileSystem> _masterpageFileSystemMock = new Mock<IFileSystem>();
private readonly Mock<ITemplatesSection> _templateConfigMock = new Mock<Core.Configuration.UmbracoSettings.ITemplatesSection>();
[SetUp]
public void Setup()
{
var loggerMock = new Mock<ILogger>();
var sqlSyntaxMock = new Mock<ISqlSyntaxProvider>();
_templateRepository = new TemplateRepository(_unitOfWorkMock.Object, _cacheMock.Object, loggerMock.Object, sqlSyntaxMock.Object, _masterpageFileSystemMock.Object, _viewFileSystemMock.Object, _templateConfigMock.Object);
}
[Test]
public void DetermineTemplateRenderingEngine_Returns_MVC_When_ViewFile_Exists_And_Content_Has_Webform_Markup()
{
// Project in MVC mode
_templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc);
// Template has masterpage content
var templateMock = new Mock<ITemplate>();
templateMock.Setup(x => x.Alias).Returns("Something");
templateMock.Setup(x => x.Content).Returns("<asp:Content />");
// but MVC View already exists
_viewFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(true);
var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object);
Assert.AreEqual(RenderingEngine.Mvc, res);
}
[Test]
public void DetermineTemplateRenderingEngine_Returns_WebForms_When_ViewFile_Doesnt_Exist_And_Content_Has_Webform_Markup()
{
// Project in MVC mode
_templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc);
// Template has masterpage content
var templateMock = new Mock<ITemplate>();
templateMock.Setup(x => x.Alias).Returns("Something");
templateMock.Setup(x => x.Content).Returns("<asp:Content />");
// MVC View doesn't exist
_viewFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(false);
var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object);
Assert.AreEqual(RenderingEngine.WebForms, res);
}
[Test]
public void DetermineTemplateRenderingEngine_Returns_WebForms_When_MasterPage_Exists_And_In_Mvc_Mode()
{
// Project in MVC mode
_templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.Mvc);
var templateMock = new Mock<ITemplate>();
templateMock.Setup(x => x.Alias).Returns("Something");
// but masterpage already exists
_viewFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(false);
_masterpageFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(true);
var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object);
Assert.AreEqual(RenderingEngine.WebForms, res);
}
[Test]
public void DetermineTemplateRenderingEngine_Returns_Mvc_When_ViewPage_Exists_And_In_Webforms_Mode()
{
// Project in WebForms mode
_templateConfigMock.Setup(x => x.DefaultRenderingEngine).Returns(RenderingEngine.WebForms);
var templateMock = new Mock<ITemplate>();
templateMock.Setup(x => x.Alias).Returns("Something");
// but MVC View already exists
_viewFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(true);
_masterpageFileSystemMock.Setup(x => x.FileExists(It.IsAny<string>())).Returns(false);
var res = _templateRepository.DetermineTemplateRenderingEngine(templateMock.Object);
Assert.AreEqual(RenderingEngine.Mvc, res);
}
}
}
@@ -8,6 +8,7 @@ using System.Web;
using System.Web.Routing;
using Moq;
using Umbraco.Core;
using Umbraco.Core.Configuration;
namespace Umbraco.Tests.TestHelpers
{
@@ -60,7 +61,7 @@ namespace Umbraco.Tests.TestHelpers
//Cookie collection
var cookieCollection = new HttpCookieCollection();
cookieCollection.Add(new HttpCookie(Constants.Web.AuthCookieName, "FBA996E7-D6BE-489B-B199-2B0F3D2DD826"));
cookieCollection.Add(new HttpCookie("UMB_UCONTEXT", "FBA996E7-D6BE-489B-B199-2B0F3D2DD826"));
//Request
var requestMock = new Mock<HttpRequestBase>();
+2
View File
@@ -180,6 +180,7 @@
<Compile Include="Logging\AsyncRollingFileAppenderTest.cs" />
<Compile Include="Logging\DebugAppender.cs" />
<Compile Include="Logging\ParallelForwarderTest.cs" />
<Compile Include="Mvc\RenderIndexActionSelectorAttributeTests.cs" />
<Compile Include="Persistence\Repositories\AuditRepositoryTest.cs" />
<Compile Include="Persistence\Repositories\DomainRepositoryTest.cs" />
<Compile Include="Persistence\Repositories\PartialViewRepositoryTests.cs" />
@@ -361,6 +362,7 @@
<Compile Include="Services\MacroServiceTests.cs" />
<Compile Include="Services\UserServiceTests.cs" />
<Compile Include="Manifest\ManifestParserTests.cs" />
<Compile Include="Templates\TemplateRepositoryTests.cs" />
<Compile Include="TestHelpers\BaseSeleniumTest.cs" />
<Compile Include="Integration\InstallPackage.cs" />
<Compile Include="CoreXml\NavigableNavigatorTests.cs" />
+1 -1
View File
@@ -23,7 +23,7 @@
"jquery": "2.0.3",
"jquery-file-upload": "~9.4.0",
"jquery-ui": "1.10.3",
"angular-dynamic-locale": "~0.1.27",
"angular-dynamic-locale": "0.1.27",
"tinymce": "~4.1.10",
"codemirror": "~5.3.0"
}
@@ -1 +1,17 @@
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: url('../fonts/opensans/OpenSans-Regular-webfont.eot');
src: local('Open Sans'), local('OpenSans'), url('../fonts/opensans/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/opensans/OpenSans-Regular-webfont.ttf') format('truetype'), url('../fonts/opensans/OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: url('../fonts/opensans/OpenSans-Semibold-webfont.eot');
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url('../fonts/opensans/OpenSans-Semibold-webfont.eot?#iefix') format('embedded-opentype'), url('../fonts/opensans/OpenSans-Semibold-webfont.ttf') format('truetype'), url('../fonts/opensans/OpenSans-Semibold-webfont.svg#open_sanssemibold') format('svg');
}
abbr,address,article,aside,audio,b,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,p,pre,q,samp,section,small,span,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,ul,var,video{margin:0;padding:0;outline:0;border:0;background:0 0;vertical-align:baseline;font-size:100%}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}nav ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}a{margin:0;padding:0;background:0 0;vertical-align:baseline;font-size:100%}ins{background-color:#ff9;color:#000;text-decoration:none}mark{background-color:#ff9;color:#000;font-weight:700;font-style:italic}del{text-decoration:line-through}abbr[title],dfn[title]{border-bottom:1px dotted;cursor:help}table{border-spacing:0;border-collapse:collapse}hr{display:block;margin:1em 0;padding:0;height:1px;border:0;border-top:1px solid #ccc}input,select{vertical-align:middle}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}*,:after,:before{box-sizing:border-box}body,html{height:100%;width:100%;color:#fff;font-family:'Open Sans',sans-serif;font-weight:400;font-size:.9375em;line-height:1.5}h1{font-size:1.7em;margin:40px auto 10px;font-weight:700}h2{font-size:1.35em;margin:0 auto .4em;font-weight:700}h3{font-size:1em;font-weight:400;font-style:italic}p{font-size:1em;line-height:1.6}p+a{margin-top:1rem;display:inline-block}a,a:active,a:visited{text-decoration:none}.cta{margin:4.5em auto 1.5em;padding-bottom:4.5em}.button,.button:visited{padding:.9375em 1.875em;border-radius:.1em;font-weight:600;font-size:1.2em;background:#2e99f4;color:#fff;display:inline-block;border:none;transition:all 200ms ease-in-out}.button:hover,.button:visited:hover{border-bottom:none;background:#0c80e3}section{background:url(../img/nonodesbg.jpg) center center/cover;height:100%;width:100%;display:table;padding:3em 1.75em}section a,section a:focus,section a:visited{color:#46a5f5;font-size:1.1625em;border-bottom:1px solid transparent;transition:border-bottom 100ms ease-in-out}section a:focus:hover,section a:hover,section a:visited:hover{border-bottom:1px solid}section:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.17);background:linear-gradient(45deg,rgba(85,98,112,.1) 10%,rgba(255,107,107,.1) 95%);z-index:0}section article{display:table-cell;vertical-align:middle;margin:0 auto;text-align:center;position:relative;z-index:100}section article>div{max-width:60em;margin:0 auto}section .logo{background:url(../img/logo.png) no-repeat;width:91px;height:91px;margin:0 auto}section .row{overflow:hidden}section .row .col{text-align:left;width:100%}section .row .col:nth-child(2){margin-top:3em}@media screen and (min-width:48em){body,html{font-size:1em}h1{font-size:2.5em;margin:70px auto 0;letter-spacing:.5px}h2{font-size:1.4375em;margin:0 auto 1em}h3{font-size:1.2em}a{font-size:1.1rem;font-weight:600}p+a{margin-top:3rem}.cta{margin:7.5em auto 2.5em;border-bottom:1px solid rgba(255,255,255,.5);padding-bottom:7.5em}section{padding:0 15px}section .row .col{float:left;width:50%;padding-right:5%;display:inline-block}section .row .col:nth-child(2){padding-right:0;padding-left:5%;margin-top:0}.button{font-size:1.1625em}}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

@@ -1,16 +1,17 @@
LazyLoad.js([
'/Umbraco/lib/jquery/jquery.min.js',
'/Umbraco/lib/jquery-ui/jquery-ui.min.js',
'/Umbraco/lib/angular/1.1.5/angular.min.js',
'/Umbraco/lib/underscore/underscore-min.js',
'/Umbraco/js/app.js',
'/Umbraco/js/umbraco.resources.js',
'/Umbraco/js/umbraco.services.js',
'/Umbraco/js/umbraco.security.js',
'/Umbraco/ServerVariables',
'/Umbraco/lib/spectrum/spectrum.js',
'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js',
'/umbraco/js/canvasdesigner.panel.js',
'../lib/jquery/jquery.min.js',
'../lib/jquery-ui/jquery-ui.min.js',
'../lib/angular/1.1.5/angular.min.js',
'../lib/underscore/underscore-min.js',
'../lib/umbraco/Extensions.js',
'../js/app.js',
'../js/umbraco.resources.js',
'../js/umbraco.services.js',
'../js/umbraco.security.js',
'../ServerVariables',
'../lib/spectrum/spectrum.js',
'../js/canvasdesigner.panel.js',
], function () {
jQuery(document).ready(function () {
angular.bootstrap(document, ['Umbraco.canvasdesigner']);
@@ -24,7 +24,7 @@ var app = angular.module("Umbraco.canvasdesigner", ['colorpicker', 'ui.slider',
];
$scope.previewDevice = $scope.devices[0];
var apiController = "/Umbraco/Api/Canvasdesigner/";
var apiController = "../Api/Canvasdesigner/";
/*****************************************************************************/
/* Preview devices */
@@ -40,7 +40,7 @@ var app = angular.module("Umbraco.canvasdesigner", ['colorpicker', 'ui.slider',
/*****************************************************************************/
$scope.exitPreview = function () {
window.top.location.href = "/umbraco/endPreview.aspx?redir=%2f" + $scope.pageId;
window.top.location.href = "../endPreview.aspx?redir=%2f" + $scope.pageId;
};
/*****************************************************************************/
@@ -9,11 +9,6 @@ var canvasdesignerConfig = {
schema: "body",
selector: "body",
editors: [
{
type: "wide",
category: "Dimension",
name: "Layout"
},
{
type: "background",
category: "Color",
@@ -104,6 +104,30 @@ angular.module("Umbraco.canvasdesigner")
}
};
function loadFont(font, variant) {
WebFont.load({
google: {
families: [font.fontFamily + ":" + variant]
},
loading: function () {
console.log('loading');
},
active: function () {
$scope.selectedFont = font;
$scope.selectedFont.fontWeight = googleGetWeight(variant);
$scope.selectedFont.fontStyle = googleGetStyle(variant);
// If $apply isn't called, the new font family isn't applied until the next user click.
$scope.change({
fontFamily: $scope.selectedFont.fontFamily,
fontType: $scope.selectedFont.fontType,
fontWeight: $scope.selectedFont.fontWeight,
fontStyle: $scope.selectedFont.fontStyle,
});
}
});
}
var webFontScriptLoaded = false;
$scope.showFontPreview = function (font, variant) {
if (!variant)
@@ -114,27 +138,19 @@ angular.module("Umbraco.canvasdesigner")
// Font needs to be independently loaded in the iframe for live preview to work.
document.getElementById("resultFrame").contentWindow.getFont(font.fontFamily + ":" + variant);
WebFont.load({
google: {
families: [font.fontFamily + ":" + variant]
},
loading: function () {
console.log('loading');
},
active: function () {
$scope.selectedFont = font;
$scope.selectedFont.fontWeight = googleGetWeight(variant);
$scope.selectedFont.fontStyle = googleGetStyle(variant);
// If $apply isn't called, the new font family isn't applied until the next user click.
$scope.change({
fontFamily: $scope.selectedFont.fontFamily,
fontType: $scope.selectedFont.fontType,
fontWeight: $scope.selectedFont.fontWeight,
fontStyle: $scope.selectedFont.fontStyle,
if (!webFontScriptLoaded) {
$.getScript('https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js')
.done(function() {
webFontScriptLoaded = true;
loadFont(font, variant);
})
.fail(function() {
console.log('error loading webfont');
});
}
});
}
else {
loadFont(font, variant);
}
}
else {
@@ -2,9 +2,9 @@
<html lang="en">
<head>
<title>Umbraco Canvas Designer</title>
<link href="/Umbraco/assets/css/canvasdesigner.css" type="text/css" rel="stylesheet" />
<link href="/Umbraco/lib/spectrum/spectrum.css" type="text/css" rel="stylesheet" />
<link href="/Umbraco/lib/jquery-ui/jquery-ui-1.10.4.custom.min.css" type="text/css" rel="stylesheet" />
<link href="../assets/css/canvasdesigner.css" type="text/css" rel="stylesheet" />
<link href="../lib/spectrum/spectrum.css" type="text/css" rel="stylesheet" />
<link href="../lib/jquery-ui/jquery-ui-1.10.4.custom.min.css" type="text/css" rel="stylesheet" />
</head>
<body id="canvasdesignerPanel" ng-mouseover="outlinePositionHide()" ng-class="{ leftOpen: (showStyleEditor || showPalettePicker) && !showDevicesPreview }" ng-controller="Umbraco.canvasdesignerController">
@@ -20,7 +20,7 @@
<div class="fix-left-menu selected">
<div class="avatar">
<img ng-src="/umbraco/assets/img/application/logo.png">
<img ng-src="../assets/img/application/logo.png">
</div>
<ul class="sections" ng-class="{selected: showDevicesPreview}">
@@ -125,7 +125,7 @@
<div class="canvasdesigner-panel-container" ng-show="categoriesVisibility[category] === true">
<div class="canvasdesigner-panel-property" ng-repeat="item in configItem.editors" ng-show="item.category == category">
<h5>{{item.name}} <i class="icon icon-help-alt"></i></h5>
<div ng-include="'/Umbraco/preview/editors/' + item.type + '.html'"></div>
<div ng-include="'../preview/editors/' + item.type + '.html'"></div>
</div>
</div>
</div>
@@ -154,8 +154,8 @@
<p>Styles saved and published</p>
</div>
<script src="/umbraco/lib/rgrove-lazyload/lazyload.js"></script>
<script src="/umbraco/js/canvasdesigner.loader.js"></script>
<script src="../lib/rgrove-lazyload/lazyload.js"></script>
<script src="../js/canvasdesigner.loader.js"></script>
</body>
@@ -56,7 +56,7 @@ angular.module("umbraco.directives")
if(scope.configuration && scope.configuration.stylesheets){
angular.forEach(scope.configuration.stylesheets, function(stylesheet, key){
stylesheets.push("/css/" + stylesheet + ".css");
stylesheets.push(Umbraco.Sys.ServerVariables.umbracoSettings.cssPath + "/" + stylesheet + ".css");
await.push(stylesheetResource.getRulesByName(stylesheet).then(function (rules) {
angular.forEach(rules, function (rule) {
var r = {};
@@ -1,27 +0,0 @@
/**
* @ngdoc directive
* @name umbraco.directives.directive:umbAvatar
* @restrict E
**/
function avatarDirective() {
return {
restrict: "E", // restrict to an element
replace: true, // replace the html element with the template
templateUrl: 'views/directives/umb-avatar.html',
scope: {
name: '@',
email: '@',
hash: '@'
},
link: function(scope, element, attr, ctrl) {
scope.$watch("hash", function (val) {
//set the gravatar url
scope.gravatar = "https://www.gravatar.com/avatar/" + val + "?s=40";
});
}
};
}
angular.module('umbraco.directives').directive("umbAvatar", avatarDirective);
@@ -13,14 +13,16 @@ angular.module("umbraco.directives")
restrict: 'E',
replace: true,
templateUrl: 'views/directives/umb-property.html',
link: function(scope) {
scope.propertyAlias = Umbraco.Sys.ServerVariables.isDebuggingEnabled === true ? scope.property.alias : null;
},
//Define a controller for this directive to expose APIs to other directives
controller: function ($scope, $timeout) {
var self = this;
//set the API properties/methods
self.property = $scope.property;
self.setPropertyError = function(errorMsg) {
$scope.property.propertyErrorMessage = errorMsg;
@@ -94,14 +94,24 @@ function sectionsDirective($timeout, $window, navigationService, treeService, se
navigationService.showHelpDialog();
};
scope.sectionClick = function (section) {
scope.sectionClick = function (event, section) {
if (event.ctrlKey ||
event.shiftKey ||
event.metaKey || // apple
(event.button && event.button === 1) // middle click, >IE9 + everyone else
) {
return;
}
if (navigationService.userDialog) {
navigationService.userDialog.close();
}
if (navigationService.helpDialog) {
navigationService.helpDialog.close();
}
navigationService.hideSearch();
navigationService.showTree(section.alias);
$location.path("/" + section.alias);
@@ -38,9 +38,9 @@ angular.module("umbraco.directives")
'<div ng-class="getNodeCssClass(node)" ng-swipe-right="options(node, $event)" >' +
//NOTE: This ins element is used to display the search icon if the node is a container/listview and the tree is currently in dialog
//'<ins ng-if="tree.enablelistviewsearch && node.metaData.isContainer" class="umb-tree-node-search icon-search" ng-click="searchNode(node, $event)" alt="searchAltText"></ins>' +
'<ins ng-class="{\'icon-navigation-right\': !node.expanded, \'icon-navigation-down\': node.expanded}" ng-click="load(node)"></ins>' +
'<i class="icon umb-tree-icon sprTree"></i>' +
'<a ng-click="select(node, $event)"></a>' +
'<ins ng-class="{\'icon-navigation-right\': !node.expanded, \'icon-navigation-down\': node.expanded}" ng-click="load(node)">&nbsp;</ins>' +
'<i class="icon umb-tree-icon sprTree" ng-click="select(node, $event)"></i>' +
'<a href="#/{{node.routePath}}" ng-click="select(node, $event)"></a>' +
//NOTE: These are the 'option' elipses
'<a class="umb-options" ng-click="options(node, $event)"><i></i><i></i><i></i></a>' +
'<div ng-show="node.loading" class="l"><div></div></div>' +
@@ -148,8 +148,17 @@ angular.module("umbraco.directives")
and emits it as a treeNodeSelect element if there is a callback object
defined on the tree
*/
scope.select = function(n, ev) {
scope.select = function (n, ev) {
if (ev.ctrlKey ||
ev.shiftKey ||
ev.metaKey || // apple
(ev.button && ev.button === 1) // middle click, >IE9 + everyone else
) {
return;
}
emitEvent("treeNodeSelect", { element: element, tree: scope.tree, node: n, event: ev });
ev.preventDefault();
};
/**
@@ -1,5 +1,5 @@
/**
* @description Utillity directives for key and field events
* @description Utility directives for key and field events
**/
angular.module('umbraco.directives')
@@ -4,7 +4,9 @@ angular.module("umbraco.directives").directive('focusWhen', function ($timeout)
link: function (scope, elm, attrs, ctrl) {
attrs.$observe("focusWhen", function (newValue) {
if (newValue === "true") {
elm.focus();
$timeout(function() {
elm.focus();
});
}
});
}
@@ -139,6 +139,12 @@ function entityResource($q, $http, umbRequestHelper) {
_.each(ids, function(item) {
query += "ids=" + item + "&";
});
// if ids array is empty we need a empty variable in the querystring otherwise the service returns a error
if (ids.length === 0) {
query += "ids=&";
}
query += "type=" + type;
return umbRequestHelper.resourcePromise(
@@ -36,7 +36,7 @@ function macroResource($q, $http, umbRequestHelper) {
* @methodOf umbraco.resources.macroResource
*
* @description
* Gets the result of a macro as html to display in the rich text editor
* Gets the result of a macro as html to display in the rich text editor or in the Grid
*
* @param {int} macroId The macro id to get parameters for
* @param {int} pageId The current page id
@@ -45,39 +45,17 @@ function macroResource($q, $http, umbRequestHelper) {
*/
getMacroResultAsHtmlForEditor: function (macroAlias, pageId, macroParamDictionary) {
//need to format the query string for the custom dictionary
var query = "macroAlias=" + macroAlias + "&pageId=" + pageId;
if (macroParamDictionary) {
var counter = 0;
_.each(macroParamDictionary, function (val, key) {
//check for null
val = val ? val : "";
//need to detect if the val is a string or an object
if (!angular.isString(val)) {
//if it's not a string we'll send it through the json serializer
var json = angular.toJson(val);
//then we need to url encode it so that it's safe
val = encodeURIComponent(json);
}
else {
//we still need to encode the string, it could contain line breaks, etc...
val = encodeURIComponent(val);
}
query += "&macroParams[" + counter + "].key=" + key + "&macroParams[" + counter + "].value=" + val;
counter++;
});
}
return umbRequestHelper.resourcePromise(
$http.get(
umbRequestHelper.getApiUrl(
"macroApiBaseUrl",
"GetMacroResultAsHtmlForEditor",
query)),
'Failed to retrieve macro result for macro with alias ' + macroAlias);
$http.post(
umbRequestHelper.getApiUrl(
"macroApiBaseUrl",
"GetMacroResultAsHtmlForEditor"), {
macroAlias: macroAlias,
pageId: pageId,
macroParams: macroParamDictionary
}),
'Failed to retrieve macro result for macro with alias ' + macroAlias);
}
};
}
@@ -1,6 +1,6 @@
angular.module('umbraco.security.interceptor', ['umbraco.security.retryQueue'])
// This http interceptor listens for authentication successes and failures
.factory('securityInterceptor', ['$injector', 'securityRetryQueue', 'notificationsService', function ($injector, queue, notifications) {
.factory('securityInterceptor', ['$injector', 'securityRetryQueue', 'notificationsService', 'requestInterceptorFilter', function ($injector, queue, notifications, requestInterceptorFilter) {
return function(promise) {
return promise.then(
@@ -19,6 +19,19 @@ angular.module('umbraco.security.interceptor', ['umbraco.security.retryQueue'])
return promise;
}, function(originalResponse) {
// Intercept failed requests
//Here we'll check if we should ignore the error, this will be based on an original header set
var headers = originalResponse.config ? originalResponse.config.headers : {};
if (headers["x-umb-ignore-error"] === "ignore") {
//exit/ignore
return promise;
}
var filtered = _.find(requestInterceptorFilter(), function(val) {
return originalResponse.config.url.indexOf(val) > 0;
});
if (filtered) {
return promise;
}
//A 401 means that the user is not logged in
if (originalResponse.status === 401) {
@@ -72,6 +85,10 @@ angular.module('umbraco.security.interceptor', ['umbraco.security.retryQueue'])
};
}])
.value('requestInterceptorFilter', function() {
return ["www.gravatar.com"];
})
// We have to add the interceptor to the queue as a string because the interceptor depends upon service instances that are not available in the config block.
.config(['$httpProvider', function ($httpProvider) {
$httpProvider.responseInterceptors.push('securityInterceptor');
@@ -1,5 +1,5 @@
angular.module('umbraco.services')
.factory('userService', function ($rootScope, eventsService, $q, $location, $log, securityRetryQueue, authResource, dialogService, $timeout, angularHelper) {
.factory('userService', function ($rootScope, eventsService, $q, $location, $log, securityRetryQueue, authResource, dialogService, $timeout, angularHelper, $http) {
var currentUser = null;
var lastUserId = null;
@@ -250,7 +250,7 @@ angular.module('umbraco.services')
}
setCurrentUser(data);
currentUser.avatar = 'https://www.gravatar.com/avatar/' + data.emailHash + '?s=40&d=404';
deferred.resolve(currentUser);
});
@@ -372,9 +372,6 @@ function xmlhelper($http) {
fromJson: function (json) {
var xml = x2js.json2xml_str(json);
return xml;
},
parseFeed: function (url) {
return $http.jsonp('//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=50&callback=JSON_CALLBACK&q=' + encodeURIComponent(url));
}
};
}
@@ -13,7 +13,11 @@ function MainController($scope, $rootScope, $location, $routeParams, $timeout, $
//the null is important because we do an explicit bool check on this in the view
//the avatar is by default the umbraco logo
$scope.authenticated = null;
$scope.avatar = "assets/img/application/logo.png";
$scope.avatar = [
{ value: "assets/img/application/logo.png" },
{ value: "assets/img/application/logo@2x.png" },
{ value: "assets/img/application/logo@3x.png" }
];
$scope.touchDevice = appState.getGlobalState("touchDevice");
@@ -84,20 +88,32 @@ function MainController($scope, $rootScope, $location, $routeParams, $timeout, $
tmhDynamicLocale.set($scope.user.locale);
}
if($scope.user.emailHash){
$timeout(function () {
//yes this is wrong..
$("#avatar-img").fadeTo(1000, 0, function () {
$timeout(function () {
//this can be null if they time out
if ($scope.user && $scope.user.emailHash) {
$scope.avatar = "https://www.gravatar.com/avatar/" + $scope.user.emailHash + ".jpg?s=64&d=mm";
}
if ($scope.user.emailHash) {
//let's attempt to load the avatar, it might not exist or we might not have
// internet access so we'll detect it first
$http.get("https://www.gravatar.com/avatar/" + $scope.user.emailHash + ".jpg?s=64&d=404")
.then(
function successCallback(response) {
$("#avatar-img").fadeTo(1000, 0, function () {
$scope.$apply(function () {
//this can be null if they time out
if ($scope.user && $scope.user.emailHash) {
var avatarBaseUrl = "https://www.gravatar.com/avatar/",
hash = $scope.user.emailHash;
$scope.avatar = [
{ value: avatarBaseUrl + hash + ".jpg?s=30&d=mm" },
{ value: avatarBaseUrl + hash + ".jpg?s=60&d=mm" },
{ value: avatarBaseUrl + hash + ".jpg?s=90&d=mm" }
];
}
});
$("#avatar-img").fadeTo(1000, 1);
});
}, function errorCallback(response) {
//cannot load it from the server so we cannot do anything
});
$("#avatar-img").fadeTo(1000, 1);
});
}, 3000);
}
}));
@@ -17,9 +17,9 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
//add to umbraco installer facts here
var facts = ['Umbraco helped millions of people watch a man jump from the edge of space',
'Over 250.000 websites are currently powered by Umbraco',
'Over 300 000 websites are currently powered by Umbraco',
"At least 2 people have named their cat 'Umbraco'",
'On an average day, more than 1.000 people download Umbraco',
'On an average day, more than 1000 people download Umbraco',
'<a target="_blank" href="http://umbraco.tv">umbraco.tv</a> is the premier source of Umbraco video tutorials to get you started',
'You can find the world\'s friendliest CMS community at <a target="_blank" href="http://our.umbraco.org">our.umbraco.org</a>',
'You can become a certified Umbraco developer by attending one of the official courses',
@@ -31,7 +31,7 @@ angular.module("umbraco.install").factory('installerService', function($rootScop
"At least 4 people have the Umbraco logo tattooed on them",
"'Umbraco' is the danish name for an allen key",
"Umbraco has been around since 2005, that's a looong time in IT",
"More than 400 people from all over the world meet each year in Denmark in June for our annual conference <a target='_blank' href='http://codegarden14.com'>CodeGarden</a>",
"More than 400 people from all over the world meet each year in Denmark in June for our annual conference <a target='_blank' href='http://codegarden15.com'>CodeGarden</a>",
"While you are installing Umbraco someone else on the other side of the planet is probably doing it too",
"You can extend Umbraco without modifying the source code and using either JavaScript or C#"
];
@@ -42,7 +42,7 @@
<div class="control-group">
<label class="control-label" for="server">Server</label>
<div class="controls">
<input type="text" name="server" placeholder="127.0.0.1/SQLEXPRESS" required ng-model="installer.current.model.server" />
<input type="text" name="server" placeholder="127.0.0.1\SQLEXPRESS" required ng-model="installer.current.model.server" />
<small class="inline-help">Enter server domain or IP</small>
</div>
</div>
@@ -2,8 +2,8 @@
/******* font-face *******/
@font-face {
src: url('/Umbraco/assets/fonts/helveticons/helveticons.eot') !important;
src: url('/Umbraco/assets/fonts/helveticons/helveticons.eot?#iefix') format('embedded-opentype'), url('/Umbraco/assets/fonts/helveticons/helveticons.ttf') format('truetype'), url('/Umbraco/assets/fonts/helveticons/helveticons.svg#icomoon') format('svg') !important;
src: url('assets/fonts/helveticons/helveticons.eot') !important;
src: url('assets/fonts/helveticons/helveticons.eot?#iefix') format('embedded-opentype'), url('assets/fonts/helveticons/helveticons.ttf') format('truetype'), url('assets/fonts/helveticons/helveticons.svg#icomoon') format('svg') !important;
}
/****************************/
+2 -2
View File
@@ -155,7 +155,7 @@ body {
}
#speechbubble {
z-index: 1000;
z-index: 1060;
position: absolute;
bottom: 100px;
left: 0;
@@ -266,4 +266,4 @@ body {
margin-left: 40px;
width: 85%!important;
}
}
}
@@ -8,7 +8,7 @@
background-size: 30px 30px !important;
color: @white;
position: absolute;
z-index: 2000;
z-index: 10000;
top: 0px;
left: 0px;
margin: 0 !Important;
+71 -10
View File
@@ -133,7 +133,7 @@ h5{
.umb-control-group label.control-label {
text-align: left
}
.umb-control-group label .help-block,
.umb-control-group label .help-block,
.umb-control-group label small {
font-size: 11px;
color: #a0a0a0;
@@ -148,6 +148,11 @@ h5{
padding-top: 5px;
margin-left: 240px;
}
.umb-user-panel .controls-row {
margin-left: 0px;
}
.controls-row label {
display: inline-block
}
@@ -189,7 +194,7 @@ h5{
.umb-dashboard-control a{text-decoration: underline;}
.umb-dashboard-control
.umb-dashboard-control
iframe{ position: absolute; display: block; width: 99%; height: 99%; overflow: auto !important;}
@@ -234,16 +239,16 @@ table thead a {
.umb-table tbody.ui-sortable tr.ui-sortable-helper {
background-color: @sortableHelperBg;
border: none;
border: none;
}
.umb-table tbody.ui-sortable tr.ui-sortable-helper td
.umb-table tbody.ui-sortable tr.ui-sortable-helper td
{
border:none;
}
.umb-table tbody.ui-sortable tr.ui-sortable-placeholder {
background-color: @sortablePlaceholderBg;
border:none;
border:none;
}
.umb-table tbody.ui-sortable tr.ui-sortable-placeholder td
@@ -363,7 +368,7 @@ table thead a {
background: @inputBorder;
height: 1px;
margin: 20px 0 0 0;
width: 82%;
width: 82%;
float: left;
}
@@ -432,7 +437,7 @@ table thead a {
color:@green;
}
// Loading Animation
// Loading Animation
// ------------------------
.umb-loader{
@@ -518,11 +523,67 @@ height:1px;
}
.umb-loader-wrapper {
position: absolute;
right: 0;
left: 0;
margin: 10px 0;
overflow: hidden;
overflow: hidden;
}
}
// Helpers
.strong {
font-weight: bold;
}
.inline {
display: inline;
}
// Input label styles
// @Simon: not sure where to put this part yet
// --- TODO Needs to be divided into the right .less directories
// Titles for input fields
.input-label--title {
font-weight: bold;
color: @black;
margin-bottom: 3px;
}
// Used for input checkmark fields
.input-label--small {
display: inline;
font-size: 12px;
font-weight: bold;
color: fade(@black, 70);
&:hover {
color: @black;
}
}
input[type=checkbox]:checked + .input-label--small {
color: @blue;
}
// Use this for headers in the panels
.panel-dialog--header {
border-bottom: 1px solid @gray;
margin: 10px 0;
padding-bottom: 10px;
font-size: @fontSizeLarge;
font-weight: bold;
line-height: 20px;
}

Some files were not shown because too many files have changed in this diff Show More