From 1cf46591b07e794a5135c5eaef03c54f9f98a682 Mon Sep 17 00:00:00 2001 From: Carla Martinez Date: Mon, 19 Feb 2024 20:20:34 +0100 Subject: [PATCH] Remove unnecesary redux files The Redux functionality won't be used in this context, so it can be safely removed. Signed-off-by: Carla Martinez --- src/store/Identity/userGroups-slice.ts | 23 ----------------------- src/store/Identity/userGroups.json | 22 ---------------------- src/store/store.ts | 2 -- 3 files changed, 47 deletions(-) delete mode 100644 src/store/Identity/userGroups-slice.ts delete mode 100644 src/store/Identity/userGroups.json diff --git a/src/store/Identity/userGroups-slice.ts b/src/store/Identity/userGroups-slice.ts deleted file mode 100644 index 92e2bb7af..000000000 --- a/src/store/Identity/userGroups-slice.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { createSlice } from "@reduxjs/toolkit"; -import type { RootState } from "../store"; -import userGroupsJson from "./userGroups.json"; -// Data type -import { UserGroupOld } from "src/utils/datatypes/globalDataTypes"; - -interface UserGroupState { - userGroupList: UserGroupOld[]; -} - -const initialState: UserGroupState = { - userGroupList: userGroupsJson, -}; - -const userGroupsSlice = createSlice({ - name: "usergroups", - initialState, - reducers: {}, -}); - -export const selectUserGroups = (state: RootState) => - state.usergroups.userGroupList; -export default userGroupsSlice.reducer; diff --git a/src/store/Identity/userGroups.json b/src/store/Identity/userGroups.json deleted file mode 100644 index a88099d2b..000000000 --- a/src/store/Identity/userGroups.json +++ /dev/null @@ -1,22 +0,0 @@ -[ - { - "name": "admins", - "gid": "613800000", - "description": "Account administrators group" - }, - { - "name": "editors", - "gid": "613800002", - "description": "Limited admins who can edit other users" - }, - { - "name": "employees", - "gid": "613800005", - "description": "Test Employees" - }, - { - "name": "group123", - "gid": "613800008", - "description": "The best group ever" - } -] diff --git a/src/store/store.ts b/src/store/store.ts index 2d6ae9670..a6586e0d4 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -3,7 +3,6 @@ import { setupListeners } from "@reduxjs/toolkit/query"; import globalReducer from "./Global/global-slice"; import activeUsersReducer from "./Identity/activeUsers-slice"; import netgroupsReducer from "./Identity/netgroups-slice"; -import userGroupsReducer from "./Identity/userGroups-slice"; import rolesReducer from "./IPA server/roles-slice"; import hbacRulesReducer from "./Policy/hbacRules-slice"; import sudoRulesReducer from "./Policy/sudoRules-slice"; @@ -20,7 +19,6 @@ const store = configureStore({ global: globalReducer, activeUsers: activeUsersReducer, netgroups: netgroupsReducer, - usergroups: userGroupsReducer, roles: rolesReducer, hbacrules: hbacRulesReducer, sudorules: sudoRulesReducer,