Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Is a member of][User groups] Sync with API data #264

Closed
wants to merge 3 commits into from

Conversation

carma12
Copy link
Collaborator

@carma12 carma12 commented Jan 31, 2024

The 'Is a member of' > 'User groups' table has been adapted to replace the dummy data with the real one from the IPA server.

The `User` data type needs the following
parameters that will be managed in the
'Is a member of' section:
- `memberof_group`
- `memberof_netgroup`
- `memberof_role`
- `memberof_hbacrule`
- `memberof_sudorule`
- `memberof_subid`

Signed-off-by: Carla Martinez <[email protected]>
As other components are using the `MemberOfTable` and
`MemberOfToolbar` components, there are many dependencies
to correct and adapt. The new `MemberOfTableNew` and
`MemberOfToolbarNew` have been defined to be used
when adapting the 'User groups' data only.

The same has been done in the data types by
creating a new `UserGroupNew` type that will be
used later.

The `normalizeString` utility function is meant to
normalize LDAP values from `string[]` to `string`.

Signed-off-by: Carla Martinez <[email protected]>
The dummy data must be replaced by the
data from the API for the 'User groups'
only.

Signed-off-by: Carla Martinez <[email protected]>
error: userGroupsResult.error as unknown as FetchBaseQueryError,
};
},
}),
}),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an unmerged PR I created a generic function for this. Otherwise we will have 10+ functions that all use the same code except for the "method". If it's ok, I suggest to wait for the "services" PR to go through, then we can refactor this PR (and others?) to use wrappers to invoke the generic "getting" function.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an unmerged PR I created a generic function for this. Otherwise we will have 10+ functions that all use the same code except for the "method". If it's ok, I suggest to wait for the "services" PR to go through, then we can refactor this PR (and others?) to use wrappers to invoke the generic "getting" function.

@carma12 Actually looking at your other PR's they all use this function, so that refactoring I mentioned above can be done afterwards in a new PR

@carma12
Copy link
Collaborator Author

carma12 commented Feb 22, 2024

Closing this PR in favor of this one: #289

@carma12 carma12 closed this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants