Fixing auto-merge errors

This commit is contained in:
Benedek Farkas
2017-11-10 01:01:21 +01:00
parent 7599a25594
commit d8338df357
2 changed files with 2 additions and 1 deletions

View File

@@ -61,6 +61,7 @@ namespace Orchard.MediaLibrary.Services {
UrlHelper url) { UrlHelper url) {
List<LocalizedString> validationErrors; List<LocalizedString> validationErrors;
var user = _membershipService.ValidateUser(userName, password, out validationErrors);
if (!_authorizationService.TryCheckAccess(Permissions.ManageOwnMedia, user, null) if (!_authorizationService.TryCheckAccess(Permissions.ManageOwnMedia, user, null)
&& !_authorizationService.TryCheckAccess(Permissions.EditMediaContent, user, null)) { && !_authorizationService.TryCheckAccess(Permissions.EditMediaContent, user, null)) {
throw new OrchardCoreException(T("Access denied")); throw new OrchardCoreException(T("Access denied"));

View File

@@ -25,7 +25,7 @@ namespace Orchard.Taxonomies.Handlers {
Filters.Add(StorageFilter.For(repository)); Filters.Add(StorageFilter.For(repository));
OnPublished<TaxonomyPart>((context, part) => { OnPublished<TaxonomyPart>((context, part) => {
if (String.IsNullOrWhiteSpace(part.TermTypeName)) { if (string.IsNullOrWhiteSpace(part.TermTypeName)) {
// is it a new taxonomy ? // is it a new taxonomy ?
taxonomyService.CreateTermContentType(part); taxonomyService.CreateTermContentType(part);
} }