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 data #293

Merged
merged 4 commits into from
Mar 6, 2024

Conversation

carma12
Copy link
Collaborator

@carma12 carma12 commented Feb 27, 2024

The 'User groups' dummy data from the table has been synchronized using the real data from the API.

@carma12 carma12 added the WIP Work in Progress (do not merge) label Feb 27, 2024
@carma12 carma12 changed the title [WIP][Is a member of] User groups sync data [Is a member of] User groups sync data Feb 27, 2024
@carma12 carma12 requested a review from pvoborni February 27, 2024 13:37
@carma12 carma12 removed the WIP Work in Progress (do not merge) label Feb 27, 2024
@carma12 carma12 requested a review from mreynolds389 February 27, 2024 13:37
Copy link
Member

@pvoborni pvoborni left a comment

Choose a reason for hiding this comment

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

Hi, comments added.

src/utils/utils.tsx Outdated Show resolved Hide resolved
src/components/MemberOf/MemberOfUserGroups.tsx Outdated Show resolved Hide resolved
src/components/MemberOf/MemberOfUserGroups.tsx Outdated Show resolved Hide resolved
src/hooks/useUserMemberOfData.tsx Outdated Show resolved Hide resolved
src/hooks/useUserMemberOfData.tsx Outdated Show resolved Hide resolved
src/hooks/useUserMemberOfData.tsx Outdated Show resolved Hide resolved
src/services/rpc.ts Outdated Show resolved Hide resolved
src/utils/utils.tsx Outdated Show resolved Hide resolved
@carma12 carma12 force-pushed the user-groups-sync-data-2 branch from 602e588 to c804280 Compare March 1, 2024 09:59
@carma12
Copy link
Collaborator Author

carma12 commented Mar 1, 2024

@pvoborni - I have adapted the code based on your comments.

carma12 added 4 commits March 1, 2024 11:09
The deprecated `UserGroup` data type
should be renamed and the components
that consumes it adapted to the new
name. At the same time, a new
`UserGroup` type should take the
new values and be ready to be used.

```ts
export interface UserGroup {
  cn: string;
  gidnumber: string;
  description: string;
  dn: string;
}
```

Signed-off-by: Carla Martinez <carlmart@redhat.com>
The `User` data type needs the
following parameters to manage
the 'Is a member of' data:

```
  memberof_group: string[]; // multivalue
  memberof_subid?: string[]; // multivalue
  memberof_netgroup: string[]; // multivalue
  memberof_role: string[]; // multivalue
  memberof_hbacrule: string[]; // multivalue
  memberof_sudorule: string[]; // multivalue
  memberof_subid: string[]; // multivalue
```

Signed-off-by: Carla Martinez <carlmart@redhat.com>
New endpoint to retrieve the list
of uids and user groups should
be created. The latter will be
used in a custom hook that would
retrieve all needed info related
to the 'Is a member of' section.

Signed-off-by: Carla Martinez <carlmart@redhat.com>

TEMP: usergroups endpoint and c.hook

Signed-off-by: Carla Martinez <carlmart@redhat.com>
The dummy data from the table
must be replaced by the data
from the API server.

Signed-off-by: Carla Martinez <carlmart@redhat.com>
@carma12 carma12 force-pushed the user-groups-sync-data-2 branch from c804280 to 1f763ad Compare March 1, 2024 10:09
Copy link
Member

@pvoborni pvoborni left a comment

Choose a reason for hiding this comment

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

LGTM

@carma12 carma12 merged commit 598149e into freeipa:main Mar 6, 2024
3 checks passed
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