Added connection info for Bodine to connect to SQL Server 2008 and 2012.
Modified code with regards to starting PROMS as backdoor administrator
This commit is contained in:
parent
59702d40aa
commit
88e893621c
@ -91,9 +91,13 @@
|
||||
<add name="VEPROMS_LOCAL" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=VEPROMS;Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
<add name="VEPROMS_RMARK_DEBUG" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
<add name="VEPROMS_RMARK_DEMO" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
<add name="VEPROMS_BODINE_DEBUG" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
<add name="VEPROMS_BODINE_DEMO" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
<!--<add name="VEPROMS_BODINE_DEBUG" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
<add name="VEPROMS_BODINE_DEMO" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />-->
|
||||
<add name="VEPROMS_BODINE_DEBUG" connectionString="Data Source=JCB2-HP\VOLIAN08;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
<add name="VEPROMS_BODINE_DEMO" connectionString="Data Source=JCB2-HP\VOLIAN08;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
<!--<add name="VEPROMS_BODINE_DEBUG" connectionString="Data Source=JCB2-HP\VOLIAN12;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />
|
||||
<add name="VEPROMS_BODINE_DEMO" connectionString="Data Source=JCB2-HP\VOLIAN12;Initial Catalog={MENU};Integrated Security=True" providerName="System.Data.SqlClient" />-->
|
||||
</connectionStrings>
|
||||
<userSettings>
|
||||
<VEPROMS.Properties.Settings>
|
||||
<setting name="ShowDefaultFolderProp" serializeAs="String">
|
||||
|
@ -924,13 +924,31 @@ namespace VEPROMS
|
||||
}
|
||||
VlnSettings.UserID = proxyUser;
|
||||
}
|
||||
else if (parameter.StartsWith("/V3Pr0m5" + GetSecurityKey() + "=")) //this is a backdoor to create another administrator
|
||||
{
|
||||
VlnSettings.UserID = parameter.Substring(9 + GetSecurityKey().Length);
|
||||
User u = User.MakeUser(VlnSettings.UserID, "", "", "", "", "", "", "", "", "", "", DateTime.Now, VlnSettings.UserID);
|
||||
Group g = Group.GetByGroupName("Administrators");
|
||||
Membership.MakeMembership(u, g, null, "");
|
||||
}
|
||||
else if (parameter.StartsWith("/V3Pr0m5" + GetSecurityKey() + "=")) //this is a backdoor to create another administrator
|
||||
{
|
||||
VlnSettings.UserID = parameter.Substring(9 + GetSecurityKey().Length);
|
||||
UserInfo ui = UserInfo.GetByUserID(VlnSettings.UserID);
|
||||
User u;
|
||||
if (ui != null)
|
||||
{
|
||||
u = User.Get(ui.UID);
|
||||
foreach (UserMembership um in u.UserMemberships)
|
||||
{
|
||||
if (um.EndDate == null || um.EndDate == string.Empty)
|
||||
{
|
||||
Membership m = Membership.Get(um.UGID);
|
||||
m.EndDate = DateTime.Now.ToShortDateString();
|
||||
m.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
u = User.MakeUser(VlnSettings.UserID, "", "", "", "", "", "", "", "", "", "", DateTime.Now, VlnSettings.UserID);
|
||||
Group g = Group.GetByGroupName("Administrators");
|
||||
Membership.MakeMembership(u, g, null, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
lblUser.Text = VlnSettings.UserID;
|
||||
lblUser.MouseDown += new MouseEventHandler(lblUser_MouseDown);
|
||||
|
Loading…
x
Reference in New Issue
Block a user