|
From: <mar...@us...> - 2010-02-06 23:47:47
|
Revision: 20
http://cronoscontrol.svn.sourceforge.net/cronoscontrol/?rev=20&view=rev
Author: marioarce
Date: 2010-02-06 23:47:36 +0000 (Sat, 06 Feb 2010)
Log Message:
-----------
Ticket #3
website project modified to use the Custom Membership Provider for CronosControl
also:
registered the configuration file Config.xml
Modified Paths:
--------------
source/trunk/CronosControl/CronosControlWeb/Controllers/AccountController.cs
source/trunk/CronosControl/CronosControlWeb/CronosControlWeb.csproj
source/trunk/CronosControl/CronosControlWeb/Views/Shared/LogOnUserControl.ascx
source/trunk/CronosControl/CronosControlWeb/Views/Shared/Site.Master
source/trunk/CronosControl/CronosControlWeb/Web.config
Modified: source/trunk/CronosControl/CronosControlWeb/Controllers/AccountController.cs
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Controllers/AccountController.cs 2010-02-06 23:44:10 UTC (rev 19)
+++ source/trunk/CronosControl/CronosControlWeb/Controllers/AccountController.cs 2010-02-06 23:47:36 UTC (rev 20)
@@ -97,7 +97,8 @@
if (ValidateRegistration(userName, email, password, confirmPassword))
{
// Attempt to register the user
- MembershipCreateStatus createStatus = MembershipService.CreateUser(userName, password, email);
+ MembershipCreateStatus createStatus =
+ MembershipService.CreateUser(userName, password, email, string.Empty, string.Empty, true);
if (createStatus == MembershipCreateStatus.Success)
{
@@ -304,7 +305,7 @@
int MinPasswordLength { get; }
bool ValidateUser(string userName, string password);
- MembershipCreateStatus CreateUser(string userName, string password, string email);
+ MembershipCreateStatus CreateUser(string userName, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved);
bool ChangePassword(string userName, string oldPassword, string newPassword);
}
@@ -335,10 +336,10 @@
return _provider.ValidateUser(userName, password);
}
- public MembershipCreateStatus CreateUser(string userName, string password, string email)
+ public MembershipCreateStatus CreateUser(string userName, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved)
{
MembershipCreateStatus status;
- _provider.CreateUser(userName, password, email, null, null, true, null, out status);
+ _provider.CreateUser(userName, password, email, passwordQuestion, passwordAnswer, isApproved, null, out status);
return status;
}
Modified: source/trunk/CronosControl/CronosControlWeb/CronosControlWeb.csproj
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/CronosControlWeb.csproj 2010-02-06 23:44:10 UTC (rev 19)
+++ source/trunk/CronosControl/CronosControlWeb/CronosControlWeb.csproj 2010-02-06 23:47:36 UTC (rev 20)
@@ -76,6 +76,7 @@
<Content Include="App_Data\CronosControl_log.ldf">
<DependentUpon>CronosControl.mdf</DependentUpon>
</Content>
+ <Content Include="Config.xml" />
<Content Include="Content\images\bottom.gif" />
<Content Include="Content\images\dot.gif" />
<Content Include="Content\images\logo.png" />
@@ -123,6 +124,14 @@
<Project>{7191E8B4-4497-40E8-BD9A-04CD4EF802FC}</Project>
<Name>CronosControlDataAccessClassLibrary</Name>
</ProjectReference>
+ <ProjectReference Include="..\Libraries\BusinessLogic\BusinessLogic.csproj">
+ <Project>{2981718C-6614-46DF-96A5-77C016AE23A7}</Project>
+ <Name>BusinessLogic</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\Libraries\Common\Common.csproj">
+ <Project>{D3EBAC29-E2B4-4E13-97B2-B09FD3F04254}</Project>
+ <Name>Common</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Models\" />
Modified: source/trunk/CronosControl/CronosControlWeb/Views/Shared/LogOnUserControl.ascx
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Views/Shared/LogOnUserControl.ascx 2010-02-06 23:44:10 UTC (rev 19)
+++ source/trunk/CronosControl/CronosControlWeb/Views/Shared/LogOnUserControl.ascx 2010-02-06 23:47:36 UTC (rev 20)
@@ -2,13 +2,12 @@
<%
if (Request.IsAuthenticated) {
%>
- Welcome <b><%= Html.Encode(Page.User.Identity.Name) %></b>!
- [ <%= Html.ActionLink("Log Off", "LogOff", "Account") %> ]
+ Welcome <b><%= Html.Encode(Page.User.Identity.Name) %></b>! <%= Html.ActionLink("Log Off", "LogOff", "Account") %>
<%
}
else {
%>
- [ <%= Html.ActionLink("Log On", "LogOn", "Account") %> ]
+ <%= Html.ActionLink("Log On", "LogOn", "Account") %>
<%
}
%>
Modified: source/trunk/CronosControl/CronosControlWeb/Views/Shared/Site.Master
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Views/Shared/Site.Master 2010-02-06 23:44:10 UTC (rev 19)
+++ source/trunk/CronosControl/CronosControlWeb/Views/Shared/Site.Master 2010-02-06 23:47:36 UTC (rev 20)
@@ -19,7 +19,7 @@
<div class="clear">
<div id="logo">
<a href="/Default.aspx">
- <img src="../../Content/images/logo.png" alt="Cronos Control time tracker open source project" /></a></div>
+ <img src="/Content/images/logo.png" alt="Cronos Control time tracker open source project" /></a></div>
<div id="menu">
<ul class="menuitems">
<!-- menu items -->
@@ -28,6 +28,8 @@
<li>
<%= Html.ActionLink("Projects", "Index", "Projects")%></li>
<!-- end menu items -->
+ <li>
+ <% Html.RenderPartial("LogOnUserControl"); %></li>
</ul>
</div>
</div>
Modified: source/trunk/CronosControl/CronosControlWeb/Web.config
===================================================================
--- source/trunk/CronosControl/CronosControlWeb/Web.config 2010-02-06 23:44:10 UTC (rev 19)
+++ source/trunk/CronosControl/CronosControlWeb/Web.config 2010-02-06 23:47:36 UTC (rev 20)
@@ -21,7 +21,10 @@
</sectionGroup>
</sectionGroup>
</configSections>
- <appSettings/>
+ <appSettings>
+ <add key="CronosControl.Web.Configuration.RootElement" value="/cronosControl"/>
+ <add key="CronosControl.Web.Configuration.FileName" value="Config.xml"/>
+ </appSettings>
<connectionStrings>
<!--<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>-->
<!--<add name="CronosControlEntities" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|CronosControl.mdf;User Instance=true" providerName="System.Data.SqlClient"/>-->
@@ -56,10 +59,11 @@
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880"/>
</authentication>
- <membership>
+ <membership defaultProvider="CronosControlMembershipSqlProvider">
<providers>
<clear/>
- <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/"/>
+ <add name="CronosControlMembershipSqlProvider" type="CronosControl.BusinessLogic.Profile.CronosControlMembershipProvider, CronosControl.BusinessLogic" connectionStringName="CronosControlEntities" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="CronosControl" requiresUniqueEmail="true" enablePasswordRetrieval="true"/>
+ <!--<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" applicationName="/"/>-->
</providers>
</membership>
<profile>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|