Changeset 3940
- Timestamp:
- 06/23/10 20:46:30 (14 years ago)
- Location:
- branches/HeuristicLab.Services.Authentication Prototype
- Files:
-
- 4 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Services.Authentication Prototype
- Property svn:ignore
-
old new 1 1 *.suo 2 PersistenceTest 3 TestResults
-
- Property svn:ignore
-
branches/HeuristicLab.Services.Authentication Prototype/HeuristicLab.Services.Authentication Prototyp.vsmdi
r3932 r3940 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2006"> 3 <TestList name="HeuristicLabUserTestList" id="1ebca506-0e3e-4cc3-800e-9905f9a66bd2" parentListId="8c43106b-9dc1-4907-a29f-aa66a61bf5b6"> 4 <Description>just first test for HeuristicLabUser</Description> 5 <TestLinks> 6 <TestLink id="def90666-533d-bda5-8a29-fde7f290333f" name="createDBTest" storage="unittests\bin\debug\unittests.dll" type="Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestElement, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.ObjectModel, PublicKeyToken=b03f5f7f11d50a3a" /> 7 </TestLinks> 8 </TestList> 3 9 <TestList name="Testlisten" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6"> 4 10 <RunConfiguration id="3cde0e70-9e75-4b76-a987-9e1d702958f0" name="Lokaler Testlauf" storage="localtestrun.testrunconfig" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, PublicKeyToken=b03f5f7f11d50a3a" /> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.cs
r3939 r3940 1 using System; 1 2 using System.Web.Security; 3 2 4 namespace Persistence { 3 5 partial class HeuristicLabUser : MembershipUser { 6 public override bool ChangePassword(string oldPassword, string newPassword) { 7 if (oldPassword == null) { 8 throw new ArgumentNullException("oldPassword"); 9 } 10 if (newPassword == null) { 11 throw new ArgumentNullException("newPassword"); 12 } 13 if (oldPassword.Length == 0) { 14 throw new ArgumentException("Parameter oldPassword must not be empty!"); 15 } 16 if (newPassword.Length == 0) { 17 throw new ArgumentException("Parameter newPassword must not be empty!"); 18 } 19 20 if (Password.CompareTo(oldPassword) == 0) { 21 Password = newPassword; 22 return true; 23 } else { 24 return false; 25 } 26 } 27 28 public override bool ChangePasswordQuestionAndAnswer(string password, string newPasswordQuestion, string newPasswordAnswer) { 29 if (password == null) { 30 throw new ArgumentNullException("password"); 31 } 32 if (newPasswordQuestion == null) { 33 throw new ArgumentNullException("newPasswordQuestion"); 34 } 35 if (newPasswordAnswer == null) { 36 throw new ArgumentNullException("newPasswordAnswer"); 37 } 38 if (password.Length == 0) { 39 throw new ArgumentException("Parameter password must not be empty!"); 40 } 41 if (newPasswordQuestion.Length == 0) { 42 throw new ArgumentException("Parameter newPasswordQuestion must not be empty!"); 43 } 44 if (newPasswordAnswer.Length == 0) { 45 throw new ArgumentException("Parameter newPasswordAnswer must not be empty!"); 46 } 47 48 if (Password.CompareTo(password) == 0) { 49 _PasswordQuestion = newPasswordQuestion; 50 PasswordAnswer = newPasswordAnswer; 51 return true; 52 } else { 53 return false; 54 } 55 } 56 57 public override string GetPassword() { 58 return Password; 59 } 60 61 // 62 // Summary: 63 // Gets the password for the membership user from the membership data store. 64 // 65 // Parameters: 66 // passwordAnswer: 67 // The password answer for the membership user. 68 // 69 // Returns: 70 // The password for the membership user. 71 public override string GetPassword(string passwordAnswer) { 72 throw new NotImplementedException(); 73 } 74 75 // 76 // Summary: 77 // Resets a user's password to a new, automatically generated password. 78 // 79 // Returns: 80 // The new password for the membership user. 81 public override string ResetPassword() { 82 throw new NotImplementedException(); 83 } 84 85 // 86 // Summary: 87 // Resets a user's password to a new, automatically generated password. 88 // 89 // Parameters: 90 // passwordAnswer: 91 // The password answer for the membership user. 92 // 93 // Returns: 94 // The new password for the membership user. 95 public override string ResetPassword(string passwordAnswer) { 96 throw new NotImplementedException(); 97 } 98 99 public override string ToString() { 100 return UserName; 101 } 102 103 // 104 // Summary: 105 // Clears the locked-out state of the user so that the membership user can be 106 // validated. 107 // 108 // Returns: 109 // true if the membership user was successfully unlocked; otherwise, false. 110 public override bool UnlockUser() { 111 throw new NotImplementedException(); 112 } 4 113 } 5 114 } -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml
r3939 r3940 3 3 <Table Name="" Member="HeuristicLabUsers"> 4 4 <Type Name="HeuristicLabUser"> 5 <Column Member="Comment" Modifier="Virtual" Type="System.String" CanBeNull="false" /> 5 <Column Name="UserName" Modifier="Override" Type="System.String" IsReadOnly="true" CanBeNull="false" /> 6 <Column Name="Password" Type="System.String" CanBeNull="false" /> 7 <Column Name="PasswordQuestion" Modifier="Override" Type="System.String" IsReadOnly="true" CanBeNull="false" /> 8 <Column Name="LastPasswordChangedDate" Modifier="Override" Type="System.DateTime" IsReadOnly="true" CanBeNull="false" /> 9 <Column Name="Email" Modifier="Override" Type="System.String" CanBeNull="false" /> 10 <Column Name="Comment" Modifier="Override" Type="System.String" CanBeNull="false" /> 11 <Column Name="PasswordAnswer" Type="System.String" CanBeNull="false" /> 12 <Column Member="id" AutoSync="Never" Type="System.Int64" IsReadOnly="true" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" UpdateCheck="Always" /> 6 13 </Type> 7 14 </Table> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/DataClasses.dbml.layout
r3939 r3940 3 3 <DataContextMoniker Name="/DataClassesDataContext" /> 4 4 <nestedChildShapes> 5 <classShape Id="d272bb7d-2ecc-4bb7-851f-8e1ecee6fdbd" absoluteBounds="3.625, 1.875, 2, 1.0016910807291666">5 <classShape Id="d272bb7d-2ecc-4bb7-851f-8e1ecee6fdbd" absoluteBounds="3.625, 1.875, 2, 2.3478011067708326"> 6 6 <DataClassMoniker Name="/DataClassesDataContext/HeuristicLabUser" /> 7 7 <nestedChildShapes> 8 <elementListCompartment Id="cb578485-5602-4fe8-96b8-63d240ffa2d9" absoluteBounds="3.64, 2.335, 1.9700000000000002, 0.44169108072916663" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />8 <elementListCompartment Id="cb578485-5602-4fe8-96b8-63d240ffa2d9" absoluteBounds="3.64, 2.335, 1.9700000000000002, 1.7878011067708333" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> 9 9 </nestedChildShapes> 10 10 </classShape> -
branches/HeuristicLab.Services.Authentication Prototype/Persistence/Persistence.csproj
r3939 r3940 50 50 </ItemGroup> 51 51 <ItemGroup> 52 <Compile Include="DatabaseUtil.cs" /> 52 53 <Compile Include="DataClasses.cs"> 53 54 <DependentUpon>DataClasses.dbml</DependentUpon> 54 55 </Compile> 55 <Compile Include="HeuristicLabUser.designer.cs">56 <AutoGen>True</AutoGen>57 <DesignTime>True</DesignTime>58 <DependentUpon>HeuristicLabUser.dbml</DependentUpon>59 </Compile>60 56 <Compile Include="Properties\AssemblyInfo.cs" /> 61 </ItemGroup>62 <ItemGroup>63 <None Include="HeuristicLabUser.dbml">64 <Generator>MSLinqToSQLGenerator</Generator>65 <LastGenOutput>HeuristicLabUser.designer.cs</LastGenOutput>66 <SubType>Designer</SubType>67 </None>68 57 </ItemGroup> 69 58 <ItemGroup> … … 71 60 </ItemGroup> 72 61 <ItemGroup> 73 <None Include="ClassDiagram1.cd" />74 62 <None Include="DataClasses.dbml"> 75 63 <Generator>MSLinqToSQLGenerator</Generator> 76 64 <SubType>Designer</SubType> 77 </None>78 <None Include="HeuristicLabUser.dbml.layout">79 <DependentUpon>HeuristicLabUser.dbml</DependentUpon>80 65 </None> 81 66 </ItemGroup> -
branches/HeuristicLab.Services.Authentication Prototype/UnitTests/UnitTests.csproj
r3932 r3940 39 39 </Reference> 40 40 <Reference Include="System.Data" /> 41 <Reference Include="System.Data.DataSetExtensions"> 42 <RequiredTargetFramework>3.5</RequiredTargetFramework> 43 </Reference> 44 <Reference Include="System.Data.Linq"> 45 <RequiredTargetFramework>3.5</RequiredTargetFramework> 46 </Reference> 41 47 <Reference Include="System.Runtime.Serialization"> 42 48 <RequiredTargetFramework>3.0</RequiredTargetFramework> … … 54 60 <Compile Include="HeuristicLabMembershipProviderTest.cs" /> 55 61 <Compile Include="HeuristicLabRoleProviderTest.cs" /> 62 <Compile Include="HeuristicLabUserTest.cs" /> 56 63 <Compile Include="Properties\AssemblyInfo.cs" /> 57 64 </ItemGroup> … … 69 76 </ProjectReference> 70 77 </ItemGroup> 78 <ItemGroup> 79 <Shadow Include="Test References\Persistence.accessor" /> 80 </ItemGroup> 71 81 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 72 82 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.