Skip to content

Commit 1335503

Browse files
authored
Merge pull request #121 from cesmii/CO5/Develop
Co5/develop
2 parents b600e87 + 40f4bf1 commit 1335503

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/workflows/frontend-publish-azure.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ env:
3131
BUILD_OUTPUT_DIRECTORY: './frontend/build'
3232
WORKING_DIRECTORY: 'frontend'
3333
# set this to the node version to use
34-
NODE_VERSION: '14.17.3'
34+
NODE_VERSION: '16.x'
3535

3636
jobs:
3737
Build-and-Deploy-FrontEnd:

.github/workflows/frontend-publish-stage-azure.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ env:
3434
BUILD_OUTPUT_DIRECTORY: './frontend/build'
3535
WORKING_DIRECTORY: 'frontend'
3636
# set this to the node version to use
37-
NODE_VERSION: '14.17.3'
37+
NODE_VERSION: '16.x'
3838

3939
jobs:
4040
Build-and-Deploy-FrontEnd:

api/CESMII.ProfileDesigner.DAL/LookupDataTypeDAL.cs

+12-4
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ProfileTypeDefinitionDAL _profileTypeDefinitionDAL
5353
}
5454
public override LookupDataType CheckForExisting(LookupDataTypeModel model, UserToken userToken, bool cacheOnly = false)
5555
{
56-
var entityResult = base.FindByCondition(userToken, dt =>
56+
var matches = base.FindByCondition(userToken, dt =>
5757
(
5858
(model.ID != 0 && model.ID != null && dt.ID == model.ID)
5959
|| ( dt.Name == model.Name && dt.Code == model.Code
@@ -64,9 +64,17 @@ public override LookupDataType CheckForExisting(LookupDataTypeModel model, UserT
6464
&& dt.CustomType.Profile.Version == model.CustomType.Profile.Version
6565
&& dt.CustomType.OpcNodeId == model.CustomType.OpcNodeId
6666
))))
67-
, cacheOnly);
68-
var entity = entityResult?.FirstOrDefault();
69-
return entity;
67+
, cacheOnly).ToList();
68+
69+
//2024-08-12
70+
//Issue - FIX - must also consider owner id match unless match comes from a core nodeset (/ua or /ua/di).
71+
// We were having scenario if user 1 imports a nodeset A and then user 2 imports the same nodeset A, some of the attribute
72+
// custom type of user 1's nodeset are getting assigned to user B.
73+
matches = matches.Where(x =>
74+
x.CustomType == null ||
75+
!x.CustomType.OwnerId.HasValue ||
76+
x.CustomType.OwnerId.Value == userToken.UserId).ToList();
77+
return matches == null || matches.Count == 0 ? null : matches[0];
7078
}
7179

7280
public override async Task<int?> UpdateAsync(LookupDataTypeModel model, UserToken userToken)

frontend/src/components/OnLoginHandler.js

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export const onAADLogin = (setLoadingProps) => {
117117
//get current search criteria data
118118
setLoadingProps({
119119
loginStatusCode: 200,
120+
refreshLookupData: true,
120121
refreshSearchCriteria: true,
121122
refreshProfileSearchCriteria: true,
122123
refreshCloudLibImporterSearchCriteria: true,

0 commit comments

Comments
 (0)