Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Update Role Change forms to be aware of group & member without using tempstore.private #749

Open
dipakmdhrm opened this issue Sep 8, 2022 · 0 comments

Comments

@dipakmdhrm
Copy link
Contributor

dipakmdhrm commented Sep 8, 2022

Problem/Motivation

Og has two forms (OgAddMultipleRolesForm & OgRemoveMultipleRolesForm) to add/remove group roles for a group memeber.

Both these form extend the OgChangeMultipleRolesFormBase class which stores the group & member data in tempstore.private.

This makes it a little complicated to alter these forms and do any kind of logic that needs to be aware of current group and the member for which the roles are being updated.

Proposed resolution

There are two options:

  1. Pass the group & member data in $form_state
  2. Update the current paths for role add & remove from /group/roles/add & /group/roles/remove to /group/{group}/roles/add/{member} & /group/{group}/roles/remove/{member} respectively. This will allow developers to get the group & member data from path.

I'd actually recommend that we do both.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant