Skip to content

Commit c35061d

Browse files
[~] Rename and method description CactuseSecurity#3062
1 parent 0e2a347 commit c35061d

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

roles/lib/files/FWO.Services/ModellingConnectionHandler.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,11 @@ public void AddExtraConfig()
276276
AddExtraConfigMode = true;
277277
}
278278

279+
/// <summary>
280+
/// Checks the given interface object if it can be used with network areas that are added to the connection.
281+
/// </summary>
282+
/// <param name="interf"></param>
283+
/// <returns></returns>
279284
public bool InterfaceAllowedWithNetworkArea(ModellingConnection interf)
280285
{
281286
if (!ActConn.IsInterface && !ActConn.IsCommonService && interf.AppId != ActConn.AppId &&
@@ -288,7 +293,11 @@ public bool InterfaceAllowedWithNetworkArea(ModellingConnection interf)
288293
return true;
289294
}
290295

291-
public bool InterfaceAllowedWithNetworkArea()
296+
/// <summary>
297+
/// Checks the selected interface if it is foreign to the modelled connection
298+
/// </summary>
299+
/// <returns></returns>
300+
public bool IsNotInterfaceForeignToApp()
292301
{
293302
if (!ActConn.IsInterface && !ActConn.IsCommonService && ActConn.UsedInterfaceId != null &&
294303
ActConn.UsedInterfaceId > 0 && PreselectedInterfaces.FirstOrDefault(_ => _.Id == ActConn.UsedInterfaceId)?.AppId != ActConn.AppId)

roles/ui/files/FWO.UI/Pages/NetworkModelling/EditConn.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@
513513
}
514514
if(Container.AreaElements.Count > 0)
515515
{
516-
if (ConnHandler is not null && !ConnHandler.InterfaceAllowedWithNetworkArea())
516+
if (ConnHandler is not null && !ConnHandler.IsNotInterfaceForeignToApp())
517517
{
518518
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), userConfig.GetText("U9024"), true);
519519
Container.Clear();
@@ -569,7 +569,7 @@
569569
}
570570
if(Container.AreaElements.Count > 0)
571571
{
572-
if (ConnHandler is not null && !ConnHandler.InterfaceAllowedWithNetworkArea())
572+
if (ConnHandler is not null && !ConnHandler.IsNotInterfaceForeignToApp())
573573
{
574574
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), userConfig.GetText("U9024"), true);
575575
Container.Clear();

roles/ui/files/FWO.UI/Pages/NetworkModelling/EditConnLeftSide.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@
364364
}
365365
if(areas.Count > 0)
366366
{
367-
if (ConnHandler is not null && !ConnHandler.InterfaceAllowedWithNetworkArea())
367+
if (ConnHandler is not null && !ConnHandler.IsNotInterfaceForeignToApp())
368368
{
369369
DisplayMessageInUi(default, userConfig.GetText("edit_connection"), userConfig.GetText("U9024"), true);
370370
selectedNwElems = new();

0 commit comments

Comments
 (0)