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

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 join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant