Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/24/10 00:23:16 (14 years ago)
Author:
hmayr
Message:

following changes (#1046):

  • extended DatabaseUtil.cs
  • extended HeuristicLabUser.cs
  • created HeuristicLabUserTest.cs
  • created AbstractHeuristicLabTest.cs
  • implemented a demo method in HeuristicLabMembershipProvider.cs to show usage of HeuristicLabUser.cs and DatabaseUtil.cs
Location:
branches/HeuristicLab.Services.Authentication Prototype/Service
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabMembershipProvider.cs

    r3939 r3943  
    11using System;
    2 using System.Collections.Generic;
    32using System.Linq;
    4 using System.Text;
    53using System.Web.Security;
     4using Persistence;
    65
    76namespace Service.Provider {
     
    1716
    1817    public override bool ChangePassword(string username, string oldPassword, string newPassword) {
    19       throw new NotImplementedException();
     18      DataClassesDataContext db = DatabaseUtil.createDataClassesDataContext();
     19      if (db == null) {
     20        return false;
     21      }
     22      try {
     23        HeuristicLabUser u = db.HeuristicLabUsers.Single(x => x.UserName == username);
     24        if (u.ChangePassword(oldPassword, newPassword)) {
     25          db.SubmitChanges();
     26          return true;
     27        } else {
     28          return false;
     29        }
     30      }
     31      catch (Exception) {
     32        return false;
     33      }
    2034    }
    2135
  • branches/HeuristicLab.Services.Authentication Prototype/Service/Provider/HeuristicLabRoleProvider.cs

    r3939 r3943  
    11using System;
    2 using System.Collections.Generic;
    3 using System.Linq;
    4 using System.Text;
    52using System.Web.Security;
     3using Persistence;
    64
    75namespace Service.Provider {
  • branches/HeuristicLab.Services.Authentication Prototype/Service/Service.csproj

    r3932 r3943  
    3838    </Reference>
    3939    <Reference Include="System.Data" />
     40    <Reference Include="System.Data.Linq">
     41      <RequiredTargetFramework>3.5</RequiredTargetFramework>
     42    </Reference>
    4043    <Reference Include="System.Runtime.Serialization">
    4144      <RequiredTargetFramework>3.0</RequiredTargetFramework>
     
    7477  </Target>
    7578  -->
     79  <ProjectExtensions>
     80    <VisualStudio>
     81      <FlavorProperties GUID="{3D9AD99F-2412-4246-B90B-4EAA41C64699}">
     82        <WcfProjectProperties>
     83          <AutoStart>True</AutoStart>
     84        </WcfProjectProperties>
     85      </FlavorProperties>
     86    </VisualStudio>
     87  </ProjectExtensions>
    7688</Project>
Note: See TracChangeset for help on using the changeset viewer.