mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-26 03:40:56 +08:00
committed by
Sébastien Ros
parent
70adb1833f
commit
8036e539b6
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
@@ -55,7 +56,8 @@ namespace Orchard.Media.Services {
|
||||
XRpcStruct file,
|
||||
UrlHelper url) {
|
||||
|
||||
var user = _membershipService.ValidateUser(userName, password);
|
||||
List<LocalizedString> validationErrors;
|
||||
var user = _membershipService.ValidateUser(userName, password, out validationErrors);
|
||||
if (!_authorizationService.TryCheckAccess(Permissions.ManageMedia, user, null)) {
|
||||
throw new OrchardCoreException(T("Access denied"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user