Changeset 4321 for trunk/sources
- Timestamp:
- 08/26/10 04:23:35 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Services.OKB/3.3/HeuristicLab.Services.OKB-3.3.csproj
r4313 r4321 115 115 <Reference Include="System.Runtime.Serialization" /> 116 116 <Reference Include="System.ServiceModel" /> 117 <Reference Include="System.Web" /> 118 <Reference Include="System.Web.ApplicationServices" /> 117 119 <Reference Include="System.Xml" /> 118 120 <Reference Include="System.Xml.Linq" /> -
trunk/sources/HeuristicLab.Services.OKB/3.3/RunnerService.cs
r4313 r4321 25 25 using System.Linq; 26 26 using System.ServiceModel; 27 using System.Web.Security; 27 28 using HeuristicLab.Services.OKB.DataAccess; 28 29 using log4net; … … 307 308 /// </returns> 308 309 public bool Login(string clientname) { 309 string username = ServiceSecurityContext.Current.PrimaryIdentity.Name;310 311 Log("Authenticating {0}@{1}", user name, clientname);312 if ( string.IsNullOrEmpty(username)||310 MembershipUser user = Membership.GetUser(); 311 312 Log("Authenticating {0}@{1}", user.UserName, clientname); 313 if (user == null || 313 314 string.IsNullOrEmpty(clientname) || 314 315 ServiceSecurityContext.Current.IsAnonymous) { … … 317 318 } 318 319 using (OKBDataContext okb = new OKBDataContext()) { 319 currentUser = okb.Users.SingleOrDefault(u => u. Name == username);320 currentUser = okb.Users.SingleOrDefault(u => u.Id == (Guid)user.ProviderUserKey); 320 321 currentClient = okb.Clients.SingleOrDefault(c => c.Name == clientname); 321 322 if (currentUser == null) { 322 currentUser = new User() { Name = user name, Id = Guid.NewGuid()};323 currentUser = new User() { Name = user.UserName, Id = (Guid)user.ProviderUserKey }; 323 324 okb.Users.InsertOnSubmit(currentUser); 324 325 okb.SubmitChanges();
Note: See TracChangeset
for help on using the changeset viewer.