Skip to content

Commit

Permalink
Temporarily disable outlier detection functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
tchrapovic committed Apr 5, 2024
1 parent 700988f commit 084cb54
Show file tree
Hide file tree
Showing 49 changed files with 92 additions and 3,641 deletions.
1 change: 0 additions & 1 deletion config/sql/native/postgres-audit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ DO $$ BEGIN
'ROLE',
'ROLE_ANALYSIS_CLUSTER',
'ROLE_ANALYSIS_SESSION',
'ROLE_ANALYSIS_OUTLIER',
'SECURITY_POLICY',
'SEQUENCE',
'SERVICE',
Expand Down
27 changes: 0 additions & 27 deletions config/sql/native/postgres.sql
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ CREATE TYPE ObjectType AS ENUM (
'ROLE',
'ROLE_ANALYSIS_CLUSTER',
'ROLE_ANALYSIS_SESSION',
'ROLE_ANALYSIS_OUTLIER',
'SECURITY_POLICY',
'SEQUENCE',
'SERVICE',
Expand Down Expand Up @@ -1254,32 +1253,6 @@ CREATE TRIGGER m_role_analysis_session_update_tr BEFORE UPDATE ON m_role_analysi
CREATE TRIGGER m_role_analysis_session_oid_delete_tr AFTER DELETE ON m_role_analysis_session
FOR EACH ROW EXECUTE FUNCTION delete_object_oid();

CREATE TABLE m_role_analysis_outlier (
oid UUID NOT NULL PRIMARY KEY REFERENCES m_object_oid(oid),
objectType ObjectType GENERATED ALWAYS AS ('ROLE_ANALYSIS_OUTLIER') STORED
CHECK (objectType = 'ROLE_ANALYSIS_OUTLIER'),
targetObjectRefTargetOid UUID,
targetObjectRefTargetType ObjectType,
targetObjectRefRelationId INTEGER REFERENCES m_uri(id),
targetClusterRefTargetOid UUID,
targetClusterRefTargetType ObjectType,
targetClusterRefRelationId INTEGER REFERENCES m_uri(id)
)
INHERITS (m_assignment_holder);

CREATE TRIGGER m_role_analysis_outlier_oid_insert_tr BEFORE INSERT ON m_role_analysis_outlier
FOR EACH ROW EXECUTE FUNCTION insert_object_oid();
CREATE TRIGGER m_role_analysis_outlier_update_tr BEFORE UPDATE ON m_role_analysis_outlier
FOR EACH ROW EXECUTE FUNCTION before_update_object();
CREATE TRIGGER m_role_analysis_outlier_oid_delete_tr AFTER DELETE ON m_role_analysis_outlier
FOR EACH ROW EXECUTE FUNCTION delete_object_oid();

CREATE INDEX m_role_analysis_outlier_targetObjectRefTargetOid_idx ON m_role_analysis_outlier (targetObjectRefTargetOid);
CREATE INDEX m_role_analysis_outlier_targetObjectRefTargetType_idx ON m_role_analysis_outlier (targetObjectRefTargetType);
CREATE INDEX m_role_analysis_outlier_targetObjectRefRelationId_idx ON m_role_analysis_outlier (targetObjectRefRelationId);
CREATE INDEX m_role_analysis_outlier_targetClusterRefTargetOid_idx ON m_role_analysis_outlier (targetClusterRefTargetOid);
CREATE INDEX m_role_analysis_outlier_targetClusterRefTargetType_idx ON m_role_analysis_outlier (targetClusterRefTargetType);
CREATE INDEX m_role_analysis_outlier_targetClusterRefRelationId_idx ON m_role_analysis_outlier (targetClusterRefRelationId);


-- Represents LookupTableType, see https://docs.evolveum.com/midpoint/reference/misc/lookup-tables/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,4 @@ public class GuiStyleConstants {
public static final String CLASS_MARK = "fa-solid fa-tag";

public static final String CLASS_AUDIT = "fa-solid fa-magnifying-glass-chart";

public static final String CLASS_ICON_OUTLIER = "fa fa-user-circle";
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ public boolean isPathDefined() {
return (path != null && !path.isEmpty() && itemDef == null && parentPath == null);
}

public String getPathStringValue(){
return pathStringValue;
}

public void setPathStringValue(String pathStringValue){
this.pathStringValue = pathStringValue;
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,18 +210,6 @@ public IModel<List<ContainerPanelConfigurationType>> getPanelConfigurations() {
return super.getPanelConfigurations();
}

List<ContainerPanelConfigurationType> object = panelConfigurations.getObject();
for (ContainerPanelConfigurationType containerPanelConfigurationType : object) {
if (containerPanelConfigurationType.getIdentifier().equals("outlierPanel")) {
if (!analysisCategory.equals(RoleAnalysisCategoryType.OUTLIERS)) {
containerPanelConfigurationType.setVisibility(UserInterfaceElementVisibilityType.HIDDEN);
}
}else if(containerPanelConfigurationType.getIdentifier().equals("detectedPattern")){
if (analysisCategory.equals(RoleAnalysisCategoryType.OUTLIERS)) {
containerPanelConfigurationType.setVisibility(UserInterfaceElementVisibilityType.HIDDEN);
}
}
}
return panelConfigurations;
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,7 @@ public IModel<List<ContainerPanelConfigurationType>> getPanelConfigurations() {
for (ContainerPanelConfigurationType containerPanelConfigurationType : object) {

if (containerPanelConfigurationType.getIdentifier().equals("matchingOptions")) {
if (!analysisCategory.equals(RoleAnalysisCategoryType.ADVANCED) && !analysisCategory.equals(RoleAnalysisCategoryType.OUTLIERS)) {
containerPanelConfigurationType.setVisibility(UserInterfaceElementVisibilityType.HIDDEN);
continue;
}
}

if (containerPanelConfigurationType.getIdentifier().equals("topDetectedPattern")) {
if (analysisCategory.equals(RoleAnalysisCategoryType.OUTLIERS)) {
if (!analysisCategory.equals(RoleAnalysisCategoryType.ADVANCED)) {
containerPanelConfigurationType.setVisibility(UserInterfaceElementVisibilityType.HIDDEN);
continue;
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 084cb54

Please sign in to comment.