Пример #1
0
 public void RevokePame()
 {
     if (!NotifyService.CheckSecurity())
     {
         return;
     }
     ReplayCrimsonEvents.TPRNotificationListenerReceivedRevokePame.Log();
     this.m_callback.RevokePame();
 }
Пример #2
0
 private static bool CheckSecurity()
 {
     if (!NotifyService.AuthorizeRequest())
     {
         string     name       = ServiceSecurityContext.Current.PrimaryIdentity.Name;
         StackFrame stackFrame = new StackFrame(1);
         string     name2      = stackFrame.GetMethod().Name;
         ExTraceGlobals.ThirdPartyClientTracer.TraceError <string, string>(0L, "Access denied to user '{0}'. MethodCalled='{1}'", name, name2);
         if (!NotifyService.s_authFailedLogged)
         {
             NotifyService.s_authFailedLogged = true;
             ReplayCrimsonEvents.TPRAuthorizationFailed.Log <string>(ServiceSecurityContext.Current.PrimaryIdentity.Name);
         }
         return(false);
     }
     return(true);
 }
Пример #3
0
        public NotificationResponse DatabaseMoveNeeded(Guid dbId, string currentActiveFqdn, bool mountDesired)
        {
            if (!NotifyService.CheckSecurity())
            {
                return(NotificationResponse.Incomplete);
            }
            ReplayCrimsonEvents.TPRNotificationListenerReceivedDatabaseMoveNeeded.Log <Guid, string, bool>(dbId, currentActiveFqdn, mountDesired);
            NotificationResponse notificationResponse = this.m_callback.DatabaseMoveNeeded(dbId, currentActiveFqdn, mountDesired);

            ExTraceGlobals.ThirdPartyClientTracer.TraceDebug(0L, "NotificationListener is responded with {0} to DatabaseMoveNeeded({1},{2},{3})", new object[]
            {
                notificationResponse,
                dbId,
                currentActiveFqdn,
                mountDesired
            });
            return(notificationResponse);
        }