This commit is contained in:
20
server/ControllerHelpers/UserNameFromContext.cs
Normal file
20
server/ControllerHelpers/UserNameFromContext.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using EnumsNET;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Sockeye.Api.ControllerHelpers
|
||||
{
|
||||
|
||||
|
||||
internal static class UserNameFromContext
|
||||
{
|
||||
internal static string Name(IDictionary<object, object> HttpContextItems)
|
||||
{
|
||||
string s = (string)HttpContextItems["AY_USERNAME"];
|
||||
if (string.IsNullOrWhiteSpace(s))
|
||||
return "UNKNOWN USER NAME";
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}//eons
|
||||
Reference in New Issue
Block a user