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

Allow selecting event/category roles and registrants in attachment/folder ACLs #4505

Closed
ThiefMaster opened this issue Jun 26, 2020 · 0 comments · Fixed by #4551
Closed

Allow selecting event/category roles and registrants in attachment/folder ACLs #4505

ThiefMaster opened this issue Jun 26, 2020 · 0 comments · Fixed by #4551
Assignees
Projects

Comments

@ThiefMaster
Copy link
Member

ThiefMaster commented Jun 26, 2020

These types are already whitelisted in the models, but the AccessControlListField (which is basically a PrincipalListField) used there does not contain an option to select those types.

Unfortunately this field is still rendered using very legacy (pre-jquery) JS code. I see two options here:

  • Add support for these three principal types in the legacy field. Not fun, and the code will be ugly
  • Use the react-based PrincipalListField. You'd need to wrap it in a WTFPrincipalListField to integrate it in a classic form (where the initial value is loaded form a hidden field, and making any changes update the same hidden field). @Leats added two fields a while ago for the date/time pickers that make use of a similar integration, so you could have a look how it was done there.

Note: If you go for the second option (which would be the cleaner one), you will have to update the Python-WTForms PrincipalListField as well to use identifiers instead of fossils for the submitted data.

A good first step here before doing anything related to the wtforms integration would be adding support to select registration forms there (like it's done for event/category roles, ie with a hook similar to useFetchEventCategoryRoles to get the list of regforms to select etc). This could even be a separate Pull Request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Release 2.3
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants