Exemplo n.º 1
0
        protected override String doSelectedItem(staffSpec aStaffSpec)
        {
            if (aStaffSpec.QLId != "")
            {
                //String Description = "User contact details changed on " + DateTime.Now;
                String Description      = "ChangeContactNDS=" + aStaffSpec.queueItem.ToString().Trim() + "@" + DateTime.Now;
                String FullName         = aStaffSpec.Forename + " " + aStaffSpec.Surname;
                String wNewStaffJRBText =
                    "\"" + aStaffSpec.NDSName + "\"" +
                    "," + "\"" + aStaffSpec.Surname.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.Forename.ToUpper() + "\"" +
                    "," + "\"" + FullName.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.JobTitle.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.Tel + "\"" +
                    "," + "\"" + aStaffSpec.Department.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.StaffID.ToString() + "\"" +
                    "," + "\"" + Description + "\"";

                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
Exemplo n.º 2
0
 protected override String doSelectedItem(staffSpec aStaffSpec)
 {
     if (aStaffSpec.QLId != "")
     {
         //String Password = ""; //default
         //String Description = "Disabled on " + DateTime.Now;
         //String[] AD = aStaffSpec.ActionData.Split('=');
         //if (AD[0].ToString() == "Password")  // generated by StaffActivate
         //{
         //    Password = AD[1].ToString();
         //    if (Password != "") Description = "Trashed on " + DateTime.Now;
         //}
         //String sGroups = "\"" + "._ALL-LEAMINGTON-STAFF.GROUPWISE.WC" + "\""
         //         + "^" + "\"" + "._ALL-PERSHORE-STAFF.GROUPWISE.WC" + "\""
         //         + "^" + "\"" + "._ALL-MORETON-STAFF.GROUPWISE.WC" + "\""
         //         + "^" + "\"" + "._ALL-RUGBY-STAFF.GROUPWISE.WC" + "\""
         //         + "^" + "\"" + "._ALL-HENLEY-STAFF.GROUPWISE.WC" + "\""
         //         + "^" + "\"" + "._ALL-TRIDENT-STAFF.GROUPWISE.WC" + "\"";
         String wNewStaffJRBText =
             "\"" + aStaffSpec.NDSName + "\"";
         //+ "," + sGroups;
         return(wNewStaffJRBText);
     }
     else
     {
         return("");
     }
 }
Exemplo n.º 3
0
        protected override String doSelectedItem(staffSpec aStaffSpec)
        {
            //DateTime theDate = DateTime.Parse("31 Dec 2006 21:00:00");
            //TimeSpan timeOnly = theDate.TimeOfDay;
            //DateTime theDateNow = DateTime.Now;
            //TimeSpan timeOnlyNow = theDateNow.TimeOfDay;
            //bool result;
            //result = timeOnlyNow > timeOnly;
            //if (result)
            //{

            if (aStaffSpec.QLId != "")
            {
                //String Password = ""; //default
                //String Description = "Disabled on " + DateTime.Now;
                String[] AD = aStaffSpec.ActionData.Split('=');
                //if (AD[0].ToString() == "Password")  // generated by StaffActivate
                //{
                //    Password = AD[1].ToString();
                //    if (Password != "") Description = "Trashed on " + DateTime.Now;
                //}
                String wNewStaffJRBText =
                    "\"" + aStaffSpec.NDSName + "\"";
                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }

            //}
            //else return "";
        }
Exemplo n.º 4
0
        //ResEt the HOme directory back to original
        //when using the sethome2 utility the homedirectory is set
        //jrbCouplerHomeDir has set the home directory to something we dont't want so reset it back

        protected override String doSelectedItem(staffSpec aStaffSpec)
        {
            if (aStaffSpec.QLId != "")
            {
                String   Password    = ""; //default
                String   Description = "Disabled on " + DateTime.Now;
                String[] AD          = aStaffSpec.ActionData.Split('=');
                if (AD[0].ToString() == "Password")  // generated by StaffActivate
                {
                    Password = AD[1].ToString();
                    if (Password != "")
                    {
                        Description = "Trashed on " + DateTime.Now;
                    }
                    // write a coupler job to ClearNDSGroups
                    //write a clearNDS groups coupler job
                    //
                    staffUtility.writeCouplerMessageQueueV2(aStaffSpec.NDSName, "", "ClearNDSGroups");
                }
                String wNewStaffJRBText =
                    "\"" + aStaffSpec.NDSName + "\"" +
                    "," + "\"" + Password + "\"" +
                    "," + "\"" + Description + "\"";
                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
Exemplo n.º 5
0
        protected override String doSelectedItem(staffSpec aStaffSpec)
        {
            if (aStaffSpec.QLId != "")
            {
                //This is done in the staffSpec now; SJL 16/11/2011
                //String staffGroup = ".STA_0ther.VDI_GROUPS.LSPA.WC";//default group
                //String staffStartChar = aStaffSpec.NDSName.ToString().Trim().Substring(0, 1).ToUpper();
                //if ("ABCDEFGHIJKLMNOPQRSTUVWXYZ".Contains(staffStartChar))
                //{
                //    staffGroup = ".STA_" + staffStartChar.ToString() + ".VDI_GROUPS.LSPA.WC";
                //}
                String FullName         = aStaffSpec.Forename + " " + aStaffSpec.Surname;
                String Password         = "******";
                String ExpireDate       = "none";
                String Description      = "Created on " + DateTime.Now;
                String wNewStaffJRBText =
                    // "!Template=" + aStaffSpec.Template + "\n" +
                    "!Name context = " + "users" + aStaffSpec.Context + "\n";
                //"!Home directory volume=" + aStaffSpec.HomeVol + "\n" +
                //"!Home directory path=users\n";
                // "!Second home directory volume=" + aStaffSpec.SecondHomeVol + "\n" +
                // "!Second home directory path=users\n";
                if (aStaffSpec.GWise)
                {
                    wNewStaffJRBText +=
                        "!Groupwise add users=y" + "\n" +
                        "!Groupwise domain object=.warkscollege.groupwise.wc" + "\n" +
                        "!Groupwise post office=" + aStaffSpec.PostOffice + "\n";
                }
                wNewStaffJRBText +=
                    "\"" + aStaffSpec.NDSName + "\"" + "," + "\"" + aStaffSpec.Surname.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.Forename.ToUpper() + "\"" + "," + "\"" + Password + "\"" +
                    "," + "\"" + FullName.ToUpper() + "\"" + "," + "\"" + aStaffSpec.Department.ToUpper() + "\"" +
                    //"," + "\"" + aStaffSpec.Site.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.JobTitle.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.Tel + "\"" +
                    "," + "\"" + aStaffSpec.EmailAddress.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.EmailAddressGoogle.ToUpper() + "\"" +
                    "," + "\"" + Description + "\"" +
                    "," + "\"" + aStaffSpec.StaffID + "\"" +
                    "," + "\"" + ExpireDate + "\"" +
                    //"," + "\"" + aStaffSpec.HomeVolRestrict + "\"" +
                    //"," + "\"" + aStaffSpec.SharedVolRestrict + "\"" +
                    //"," + "\"" + aStaffSpec.Vol1VolRestrict + "\"" +
                    "," + "\"" + aStaffSpec.GroupMembership.ToString() + "\"";

                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
Exemplo n.º 6
0
 protected override String doSelectedItem(staffSpec aStaffSpec)
 {
     if (aStaffSpec.QLId != "")
     {
         /*
          * Use site name, e.g. Rugby, Trident, henley in arden and check
          * coupler table for more recent un-processed ChangeSiteNDS messages
          * for a move to any site. If there is one, ignore, as this is
          * probably a duplicate request.
          */
         String   wNewStaffJRBText = "Change site for " + aStaffSpec.NDSName;
         bool     doChangeSite     = true;
         DataView dv = staffUtility.couplerDV(
             "WHERE " +
             "(c.whenDone IS NOT NULL) AND " +
             "(c.action='ChangeSiteNDS') AND " +
             "(NDSName='" + aStaffSpec.NDSName + "') AND " +
             "(c.queueItem=" + aStaffSpec.queueItem.ToString() + ")"
             );
         if (dv != null)
         {
             if (dv.Count > 0)
             {
                 doChangeSite = false;
             }
         }
         if (doChangeSite)
         {
             String FullName = aStaffSpec.Forename + " " + aStaffSpec.Surname;
             bool   wB       = staffUtility.sendEmail(
                 "[email protected];" + aStaffSpec.EmailAddress,
                 "*****@*****.**",
                 "Staff Site Change : " + aStaffSpec.NDSName,
                 FullName + "( " + aStaffSpec.NDSName + " ) has indicated a need " +
                 "to change site to " + aStaffSpec.ActionData.Replace("NewSite=", "") + ". " +
                 "Please log a sitehelpdesk job for the network team (infra_op) for this and notify the user when complete. " +
                 "These jobs are normally expected to complete within 2 working days.",
                 null
                 );
             return(wNewStaffJRBText + ".");
         }
         return(wNewStaffJRBText + " ignored.");
     }
     else
     {
         return("");
     }
 }
Exemplo n.º 7
0
        protected override String doSelectedItem(staffSpec aStaffSpec)
        {
            if (aStaffSpec.QLId != "")
            {
                staffUtility.updateWcStaffIdentity(aStaffSpec.NDSName, "SET keepProxy = 1, forDeletion = 0");

                //String wNewStaffJRBText =
                //    "\"" + aStaffSpec.NDSName + "\"" +
                //    "," + "\"" + Password + "\"" +
                //    "," + "\"" + Description + "\"";
                String wNewStaffJRBText = "keepProxy flag set to TRUE for " + aStaffSpec.NDSName.ToString();
                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
Exemplo n.º 8
0
        protected override String doSelectedItem(staffSpec aStaffSpec)
        {
            if (aStaffSpec.QLId != "")
            {
                String Description      = "User details changed on " + DateTime.Now;
                String FullName         = aStaffSpec.Forename + " " + aStaffSpec.Surname;
                String grpName          = aStaffSpec.ActionData.Replace("Group=", "");
                String wNewStaffJRBText =
                    "\"" + aStaffSpec.NDSName + "\"" +
                    "," + "\"" + grpName.Trim() + "\"";

                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
Exemplo n.º 9
0
        protected override String doSelectedItem(staffSpec aStaffSpec)
        {
            if (aStaffSpec.QLId != "")
            {
                /*
                 * Currently a stub procedure
                 *
                 * 1. Send email to IT Services advising
                 *   of need to change login.
                 * 2. Create pending wcStaffIdentity record
                 *   by cloning current one but set
                 *   IsPending='Y' and NDSName to new value.
                 */
                String   FullName   = aStaffSpec.Forename + " " + aStaffSpec.Surname;
                String   NewNDSName = "";
                String[] AD         = aStaffSpec.ActionData.Split('=');
                if (AD[0].ToString() == "NewNDS")
                {
                    NewNDSName = AD[1].ToString();
                }

                bool wB = staffUtility.sendEmail(
                    "[email protected];[email protected];" + aStaffSpec.EmailAddress,
                    "*****@*****.**",
                    "Staff Login Change : " + aStaffSpec.NDSName,
                    FullName + "( " + aStaffSpec.NDSName + " ) has indicated a need " +
                    "to change login to " + NewNDSName + ". " +
                    "Please log a sitehelpdesk job for the network team (infra_op) for this and notify the user when complete. " +
                    "These jobs are normally expected to complete within 4 working days.",
                    null
                    );

                return
                    ("Change login processed for " + aStaffSpec.NDSName);
            }
            else
            {
                return("");
            }
        }
Exemplo n.º 10
0
        protected override String doSelectedItem(staffSpec aStaffSpec)
        {
            if (aStaffSpec.QLId != "")
            {
                String   FullName   = aStaffSpec.Forename.Trim() + " " + aStaffSpec.Surname.Trim();
                String   ExpireDate = "none";
                String   Password   = "";           //default
                String[] AD         = aStaffSpec.ActionData.Split('=');
                if (AD[0].ToString() == "Password") // generated by StaffActivate
                {
                    Password = AD[1].ToString();
                }
                String Description      = "Enabled=" + aStaffSpec.queueItem.ToString().Trim() + "@" + DateTime.Now;
                String wNewStaffJRBText =
                    // "!Template=" + aStaffSpec.Template + "\n" +
                    "!Name context = " + "users" + aStaffSpec.Context + "\n";
                wNewStaffJRBText +=
                    "\"" + aStaffSpec.NDSName + "\"" + "," + "\"" + aStaffSpec.Surname.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.Forename.ToUpper() + "\"" +
                    "," + "\"" + Password + "\"" +
                    "," + "\"" + FullName.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.Department.ToUpper() + "\"" +
                    //"," + "\"" + aStaffSpec.Site.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.JobTitle.ToUpper() + "\"" +
                    "," + "\"" + aStaffSpec.Tel + "\"" + "," + "\"" + aStaffSpec.EmailAddress.ToUpper() + "\"" +
                    "," + "\"" + Description + "\"" +
                    "," + "\"" + aStaffSpec.StaffID + "\"" +
                    "," + "\"" + aStaffSpec.GroupMembership + "\"" +
                    "," + "\"" + ExpireDate + "\"";
                //"," + "\"" + aStaffSpec.HomeVolRestrict + "\"" +
                //"," + "\"" + aStaffSpec.SharedVolRestrict + "\"" +
                //"," + "\"" + aStaffSpec.Vol1VolRestrict + "\"";

                return(wNewStaffJRBText);
            }
            else
            {
                return("");
            }
        }
Exemplo n.º 11
0
 protected override String doSelectedItem(staffSpec aStaffSpec)
 {
     if (aStaffSpec.QLId != "")
     {
         String staffGroup     = ".STA_0ther.VDI_GROUPS.LSPA.WC";//default group
         String staffStartChar = aStaffSpec.NDSName.ToString().Trim().Substring(0, 1).ToUpper();
         if ("ABCDEFGHIJKLMNOPQRSTUVWXYZ".Contains(staffStartChar))
         {
             staffGroup = ".STA_" + staffStartChar.ToString() + ".VDI_GROUPS.LSPA.WC";
         }
         String FullName         = aStaffSpec.Forename + " " + aStaffSpec.Surname;
         String Password         = "******";
         String ExpireDate       = "none";
         String Description      = "Created on " + DateTime.Now;
         String wNewStaffJRBText = "";
         wNewStaffJRBText +=
             "\"" + aStaffSpec.NDSName + "\"" + "," + "\"" + staffGroup.ToString() + "\"";
         return(wNewStaffJRBText);
     }
     else
     {
         return("");
     }
 }
Exemplo n.º 12
0
 protected virtual String doSelectedItem(staffSpec aStaffSpec)
 {
     return("");
 }