Skip to content

Commit

Permalink
DNN-10163 - AddLogSettings now returns 401 status if user has admin role
Browse files Browse the repository at this point in the history
  • Loading branch information
vano-maisuradze committed Sep 7, 2017
1 parent 8c0d420 commit 4d1f352
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@ public HttpResponseMessage AddLogSetting([FromBody] UpdateLogSettingsRequest req
{
try
{
var isAdmin = UserInfo.Roles.Contains(PortalSettings.AdministratorRoleName);
if (isAdmin)
{
return Request.CreateResponse(HttpStatusCode.Unauthorized);
}
request.LogTypePortalID = UserInfo.IsSuperUser ? request.LogTypePortalID : PortalId.ToString();

var logTypeConfigInfo = JObject.FromObject(request).ToObject<LogTypeConfigInfo>();
Expand Down

0 comments on commit 4d1f352

Please sign in to comment.