Commit 0c1c70ab authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Merge branch 'Hotfix/774-fixAnalyticsLogs' into 'master'

Hotfix/774-fixAnalyticsLogs

See merge request coscine/api/project!91
parents 31c38bd5 90c1a23c
......@@ -59,8 +59,8 @@
<Reference Include="Coscine.Action, Version=1.12.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\Coscine.Action.1.12.0\lib\net461\Coscine.Action.dll</HintPath>
</Reference>
<Reference Include="Coscine.ApiCommons, Version=1.7.1.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.7.1\lib\net461\Coscine.ApiCommons.dll</HintPath>
<Reference Include="Coscine.ApiCommons, Version=1.7.2.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.7.2\lib\net461\Coscine.ApiCommons.dll</HintPath>
</Reference>
<Reference Include="Coscine.Configuration, Version=1.5.0.0, Culture=neutral, PublicKeyToken=ce3d7a32d7dc1e5a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Configuration.1.5.0\lib\net461\Coscine.Configuration.dll</HintPath>
......@@ -68,8 +68,8 @@
<Reference Include="Coscine.Database, Version=1.19.0.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Database.1.19.0\lib\net461\Coscine.Database.dll</HintPath>
</Reference>
<Reference Include="Coscine.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=e1ed402bc3f6525e, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Logging.1.1.0\lib\net461\Coscine.Logging.dll</HintPath>
<Reference Include="Coscine.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e1ed402bc3f6525e, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Logging.1.2.0\lib\net461\Coscine.Logging.dll</HintPath>
</Reference>
<Reference Include="Coscine.ProxyApi, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ProxyApi.1.2.1\lib\net461\Coscine.ProxyApi.dll</HintPath>
......
......@@ -140,7 +140,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Coscine.Logging" publicKeyToken="e1ed402bc3f6525e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
<bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
......
......@@ -5,10 +5,10 @@
<package id="Castle.Core" version="4.4.0" targetFramework="net472" />
<package id="Consul" version="0.7.2.6" targetFramework="net472" />
<package id="Coscine.Action" version="1.12.0" targetFramework="net472" />
<package id="Coscine.ApiCommons" version="1.7.1" targetFramework="net472" />
<package id="Coscine.ApiCommons" version="1.7.2" targetFramework="net472" />
<package id="Coscine.Configuration" version="1.5.0" targetFramework="net472" />
<package id="Coscine.Database" version="1.19.0" targetFramework="net472" />
<package id="Coscine.Logging" version="1.1.0" targetFramework="net472" />
<package id="Coscine.Logging" version="1.2.0" targetFramework="net472" />
<package id="Coscine.ProxyApi" version="1.2.1" targetFramework="net472" />
<package id="EntityFramework" version="6.2.0" targetFramework="net472" />
<package id="HtmlAgilityPack" version="1.8.2" targetFramework="net472" />
......
......@@ -143,7 +143,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Coscine.Logging" publicKeyToken="e1ed402bc3f6525e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
<bindingRedirect oldVersion="0.0.0.0-1.2.0.0" newVersion="1.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Logging" publicKeyToken="31bf3856ad364e35" culture="neutral" />
......
......@@ -50,10 +50,12 @@ namespace Coscine.Api.Project.Controllers
.Select((project) => _projectModel.CreateReturnObjectFromDatabaseObject(project))
.OrderBy(element => element.DisplayName);
LogAnalytics("View Home", result);
if (Request.Query != null && Request.Query["noanalyticslog"] != "true")
{
LogAnalytics("View Home", result);
}
return Ok(result);
}
[HttpGet("[controller]/{id}")]
......@@ -97,9 +99,10 @@ namespace Coscine.Api.Project.Controllers
{
return resourceModel.CreateReturnObjectFromDatabaseObject(resource);
}).OrderBy(element => element.DisplayName);
LogAnalytics("View Resources", null, resources);
if (Request.Query != null && Request.Query["noanalyticslog"] != "true")
{
LogAnalytics("View Project", null, resources, id, user); // intentionally log as view project to help identify the related user action
}
return Json(resources);
}
else
......@@ -108,6 +111,8 @@ namespace Coscine.Api.Project.Controllers
}
}
[HttpPost("[controller]/{id}")]
public IActionResult Update(string id)
{
......
......@@ -66,7 +66,10 @@ namespace Coscine.Api.Project.Controllers
}
return new ProjectRoleObject(projectRole.ProjectId, new UserObject(userInst.Id, userInst.DisplayName, userInst.Givenname, userInst.Surname, userInst.EmailAddress), new RoleObject(role.Id, role.DisplayName));
});
LogAnalytics("View Users", user, users);
if (Request.Query != null && Request.Query["noanalyticslog"] != "true")
{
LogAnalytics("View Users", user, users, projectId);
}
return Json(users);
}
......@@ -76,8 +79,6 @@ namespace Coscine.Api.Project.Controllers
}
}
//Get all roles for current user and given project
[HttpGet("[controller]/project/{projectId}")]
public IActionResult Get(string projectId)
......
......@@ -52,8 +52,8 @@
<Reference Include="Coscine.Action, Version=1.12.0.0, Culture=neutral, processorArchitecture=AMD64">
<HintPath>..\packages\Coscine.Action.1.12.0\lib\net461\Coscine.Action.dll</HintPath>
</Reference>
<Reference Include="Coscine.ApiCommons, Version=1.7.1.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.7.1\lib\net461\Coscine.ApiCommons.dll</HintPath>
<Reference Include="Coscine.ApiCommons, Version=1.7.2.0, Culture=neutral, PublicKeyToken=af4c1345df96546b, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ApiCommons.1.7.2\lib\net461\Coscine.ApiCommons.dll</HintPath>
</Reference>
<Reference Include="Coscine.Configuration, Version=1.5.0.0, Culture=neutral, PublicKeyToken=ce3d7a32d7dc1e5a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Configuration.1.5.0\lib\net461\Coscine.Configuration.dll</HintPath>
......@@ -61,8 +61,8 @@
<Reference Include="Coscine.Database, Version=1.19.0.0, Culture=neutral, PublicKeyToken=767d77427707b70a, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Database.1.19.0\lib\net461\Coscine.Database.dll</HintPath>
</Reference>
<Reference Include="Coscine.Logging, Version=1.1.0.0, Culture=neutral, PublicKeyToken=e1ed402bc3f6525e, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Logging.1.1.0\lib\net461\Coscine.Logging.dll</HintPath>
<Reference Include="Coscine.Logging, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e1ed402bc3f6525e, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.Logging.1.2.0\lib\net461\Coscine.Logging.dll</HintPath>
</Reference>
<Reference Include="Coscine.ProxyApi, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Coscine.ProxyApi.1.2.1\lib\net461\Coscine.ProxyApi.dll</HintPath>
......
......@@ -5,10 +5,10 @@
<package id="Castle.Core" version="4.4.0" targetFramework="net472" />
<package id="Consul" version="0.7.2.6" targetFramework="net472" />
<package id="Coscine.Action" version="1.12.0" targetFramework="net472" />
<package id="Coscine.ApiCommons" version="1.7.1" targetFramework="net472" />
<package id="Coscine.ApiCommons" version="1.7.2" targetFramework="net472" />
<package id="Coscine.Configuration" version="1.5.0" targetFramework="net472" />
<package id="Coscine.Database" version="1.19.0" targetFramework="net472" />
<package id="Coscine.Logging" version="1.1.0" targetFramework="net472" />
<package id="Coscine.Logging" version="1.2.0" targetFramework="net472" />
<package id="Coscine.ProxyApi" version="1.2.1" targetFramework="net472" />
<package id="EntityFramework" version="6.2.0" targetFramework="net472" />
<package id="HtmlAgilityPack" version="1.8.2" targetFramework="net472" />
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment