Esempio n. 1
0
        /// <summary>
        /// Authorizes a user based on their jwt token
        /// </summary>
        /// <param name="operation">The operation the user requested</param>
        /// <param name="jwtToken">The jwt token of the user</param>
        private void AuthorizeUser(Constants.Operations operation, ref string jwtToken)
        {
            bool isAuthorized = authorizationManager.AuthorizeUser(operation.ToString(), ref jwtToken);

            if (!isAuthorized)
            {
                throw new ArgumentException(Constants.TicketManagerUnauthorizedUpdateTickets);
            }
        }
Esempio n. 2
0
 public Bitmap BatchOp(Constants.Operations Op, List <object> Arguments)
 {
     Global.WriteToLog("Performing batch operation " + Op.ToString(), true);
     //Clear out previous stuff
     m_ahPrimaryAutomationHandler.Clear();
     //Add op to handler
     m_ahPrimaryAutomationHandler.AddOperation(Op, Arguments);
     //Start handler
     m_ahPrimaryAutomationHandler.Start(m_ihPrimaryImageHandler.CurrentImageIndex);
     //Clear handler
     m_ahPrimaryAutomationHandler.Clear();
     //Return current image.
     return(m_ihPrimaryImageHandler.CurrentImage);
 }
Esempio n. 3
0
 public void Automation_AddOperation(Constants.Operations Op, List <object> Arguments)
 {
     Global.WriteToLog("Adding operation" + Op.ToString() + " to automation list", true);
     m_ahPrimaryAutomationHandler.AddOperation(Op, Arguments);
 }