- Timestamp:
- 09/13/18 13:18:45 (6 years ago)
- Location:
- branches/2931_OR-Tools_LP_MIP
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2931_OR-Tools_LP_MIP
- Property svn:mergeinfo changed
-
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Services.Access
- Property svn:mergeinfo changed
-
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Services.Access/3.3/Interfaces/IRoleVerifier.cs
r15583 r16139 23 23 public interface IRoleVerifier { 24 24 bool IsInRole(string role); 25 bool IsUserInRole(string username, string role); 25 26 bool IsInAnyRole(params string[] roles); 26 27 bool IsInAllRoles(params string[] roles); -
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Services.Access/3.3/Interfaces/IUserManager.cs
r15583 r16139 31 31 MembershipUser GetUserById(Guid userId); 32 32 string GetUserNameById(Guid userId); 33 IEnumerable<Guid> GetUserGroupIdsOfUser(Guid userId); 33 34 bool VerifyUser(Guid userId, List<Guid> allowedUserGroups); 35 IEnumerable<DataTransfer.UserGroupMapping> GetUserGroupMapping(); 34 36 } 35 37 } -
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Services.Access/3.3/RoleVerifier.cs
r15583 r16139 29 29 return Roles.IsUserInRole(role); 30 30 } 31 public bool IsUserInRole(string username, string role) { 32 return Roles.IsUserInRole(username, role); 33 } 31 34 public bool IsInAnyRole(params string[] roles) { 32 35 return roles.Any(x => Roles.IsUserInRole(x)); -
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Services.Access/3.3/UserManager.cs
r15583 r16139 46 46 public string GetUserNameById(Guid userId) { 47 47 var user = GetUserById(userId); 48 if (user != null ) {48 if (user != null && !string.IsNullOrWhiteSpace(user.UserName)) { 49 49 return user.UserName; 50 50 } else { … … 52 52 } 53 53 54 } 55 56 public IEnumerable<Guid> GetUserGroupIdsOfUser(Guid userId) { 57 using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) { 58 var groupIds = from g in context.UserGroupUserGroups 59 where g.UserGroupId == userId 60 select g.UserGroupUserGroupId; 61 62 var query = from g in context.UserGroupBases.OfType<DA.UserGroup>() 63 where groupIds.Contains(g.Id) 64 select g.Id; 65 66 return query.ToList(); 67 } 54 68 } 55 69 … … 74 88 } 75 89 return false; 90 } 91 92 public IEnumerable<DataTransfer.UserGroupMapping> GetUserGroupMapping() { 93 using (DA.AccessServiceDataContext context = new DA.AccessServiceDataContext()) { 94 var query = from u in context.UserGroupUserGroups 95 select Convert.ToDto(u); 96 return query.ToList(); 97 } 76 98 } 77 99 -
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Services.Access/3.3/Web.config
r14748 r16139 2 2 <configuration> 3 3 <connectionStrings> 4 <add name="HeuristicLab.Authentication" connectionString="Data Source= .\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication" />4 <add name="HeuristicLab.Authentication" connectionString="Data Source=localhost;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication" /> 5 5 </connectionStrings> 6 6 … … 30 30 <host> 31 31 <baseAddresses> 32 <add baseAddress="http:// localhost:8000/AccessService-3.3/AccessService.svc" />32 <add baseAddress="http://services.heuristiclab.com/AccessService-3.3/AccessService.svc" /> 33 33 </baseAddresses> 34 34 </host> … … 41 41 <serviceDebug includeExceptionDetailInFaults="true" /> 42 42 <serviceCredentials> 43 <serviceCertificate findValue=" localhost" x509FindType="FindBySubjectName" />43 <serviceCertificate findValue="services.heuristiclab.com" x509FindType="FindBySubjectName" /> 44 44 <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" 45 45 membershipProviderName="AspNetSqlMembershipProvider" /> -
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Services.Access/3.3/app.config
r14748 r16139 2 2 <configuration> 3 3 <connectionStrings> 4 <add name="HeuristicLab.Authentication" connectionString="Data Source= .\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication" />4 <add name="HeuristicLab.Authentication" connectionString="Data Source=localhost;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication" /> 5 5 </connectionStrings> 6 6 … … 30 30 <host> 31 31 <baseAddresses> 32 <add baseAddress="http:// localhost:8000/AccessService-3.3/AccessService.svc" />32 <add baseAddress="http://services.heuristiclab.com/AccessService-3.3/AccessService.svc" /> 33 33 </baseAddresses> 34 34 </host> … … 41 41 <serviceDebug includeExceptionDetailInFaults="true" /> 42 42 <serviceCredentials> 43 <serviceCertificate findValue=" localhost" x509FindType="FindBySubjectName" />43 <serviceCertificate findValue="services.heuristiclab.com" x509FindType="FindBySubjectName" /> 44 44 <userNameAuthentication userNamePasswordValidationMode="MembershipProvider" 45 45 membershipProviderName="AspNetSqlMembershipProvider" />
Note: See TracChangeset
for help on using the changeset viewer.