mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 21:46:52 +01:00
Cleanup
This commit is contained in:
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.DirectoryServices.AccountManagement;
|
||||
using System.Security.Principal;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Dispatcher;
|
||||
using TGServiceInterface;
|
||||
|
||||
namespace TGServerService
|
||||
@@ -106,20 +105,8 @@ namespace TGServerService
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var actions = new List<string>();
|
||||
try
|
||||
{
|
||||
var realfilter = (ActionMessageFilter)operationContext.EndpointDispatcher.ContractFilter;
|
||||
var cnamespace = operationContext.EndpointDispatcher.ContractNamespace;
|
||||
foreach (var I in realfilter.Actions)
|
||||
actions.Add(I.Replace(cnamespace, "")); //filter out some garbage
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
TGServerService.WriteError("IF YOU SEE THIS CALL CYBERBOSS: " + e.ToString(), TGServerService.EventID.Authentication);
|
||||
}
|
||||
TGServerService.WriteAccess(operationContext.ServiceSecurityContext.WindowsIdentity.Name, actions, authSuccess);
|
||||
|
||||
TGServerService.WriteAccess(operationContext.ServiceSecurityContext.WindowsIdentity.Name, authSuccess);
|
||||
return authSuccess;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,9 +97,9 @@ namespace TGServerService
|
||||
ActiveService.EventLog.WriteEntry(message, EventLogEntryType.Warning, (int)id);
|
||||
}
|
||||
|
||||
public static void WriteAccess(string username, IList<string> actions, bool authSuccess)
|
||||
public static void WriteAccess(string username, bool authSuccess)
|
||||
{
|
||||
ActiveService.EventLog.WriteEntry(String.Format("Access from: {0}. Actions: {1}", username, String.Join(", ", actions)), authSuccess ? EventLogEntryType.SuccessAudit : EventLogEntryType.FailureAudit, (int)EventID.Authentication);
|
||||
ActiveService.EventLog.WriteEntry(String.Format("Access from: {0}", username), authSuccess ? EventLogEntryType.SuccessAudit : EventLogEntryType.FailureAudit, (int)EventID.Authentication);
|
||||
}
|
||||
|
||||
ServiceHost host; //the WCF host
|
||||
|
||||
Reference in New Issue
Block a user