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,8 +91,12 @@
|
|||||||
<add name="VEPROMS_LOCAL" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=VEPROMS;Integrated Security=True" providerName="System.Data.SqlClient" />
|
<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_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_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_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_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>
|
</connectionStrings>
|
||||||
<userSettings>
|
<userSettings>
|
||||||
<VEPROMS.Properties.Settings>
|
<VEPROMS.Properties.Settings>
|
||||||
|
@ -927,9 +927,27 @@ namespace VEPROMS
|
|||||||
else if (parameter.StartsWith("/V3Pr0m5" + GetSecurityKey() + "=")) //this is a backdoor to create another administrator
|
else if (parameter.StartsWith("/V3Pr0m5" + GetSecurityKey() + "=")) //this is a backdoor to create another administrator
|
||||||
{
|
{
|
||||||
VlnSettings.UserID = parameter.Substring(9 + GetSecurityKey().Length);
|
VlnSettings.UserID = parameter.Substring(9 + GetSecurityKey().Length);
|
||||||
User u = User.MakeUser(VlnSettings.UserID, "", "", "", "", "", "", "", "", "", "", DateTime.Now, VlnSettings.UserID);
|
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");
|
Group g = Group.GetByGroupName("Administrators");
|
||||||
Membership.MakeMembership(u, g, null, "");
|
Membership.MakeMembership(u, g, null, "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lblUser.Text = VlnSettings.UserID;
|
lblUser.Text = VlnSettings.UserID;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user