- Issue created by @pemson18
- 🇨🇦Canada bohemier Québec city, Qc
It would be great to have the option in the module configuration to disable the widget, similar to the "Show term selection in the user form" setting.
- 🇮🇳India pemson18 South Goa
Refactor Patch add schema and install definition and description fixes
- 2b16b17c committed on 3.1.x-dev
Issue #3507458: Disable widget that "Adds terms permissions info to the...
- 2b16b17c committed on 3.1.x-dev
- 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf
Thanks for your patch. I have reviewed it.
1. permissions_by_term_form_node_form_alter: Here you stopping the function via your return statement at the top of the function. That way you are removing all other functionality. E.g. the form access controlling.
2. In the `SettingsForm.php` the default value for the "hide_terms_permissions_info_in_node_form" setting is true. But actually the value is not set, if the setting has not been saved manually, yet. - 33bed0bf committed on 3.1.x-dev
Issue #3507458 by pemson18, peter majmesku, bohemier: Disable widget...
- 33bed0bf committed on 3.1.x-dev
- 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf
I've added the changes to the new patch version release 3.1.36: https://www.drupal.org/project/permissions_by_term/releases/3.1.36 →
Please test the updates and reopen this issue and create a comment, if you stumble upon any issue with this update.
- 🇨🇦Canada bohemier Québec city, Qc
Thanks for the great work Peter and Pemson, this works beautifully.
- 🇮🇳India pemson18 South Goa
I stumbled upon the setting not working if the condition is set in the permissions_by_term setting form. added #13 patch for the same. Requesting Peter for reviewing the same...
- 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf
Dou cannot just add a return statement here. It breaks the entire function. Also how any error can be reproduced here? I have tested this.
- 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf
I do not experience any issue here. If I switch the setting on or off via the settings form, I do see the expected behavior. The functionality works like designed.
See attached screenshots for clarification.
If you do experience an issue here:
* Please provide step-by-step instructions for the ability to reproduce this issue on a plain Drupal site with PbT installed.
* If you do have code changes: please create a issue fork with a merge request. That way code changes can be easily discussed via in-code comments.
- 🇮🇳India pemson18 South Goa
Hello Peter, should the permission supersede the settings. Since for the admin user the permission is enabled by default and the setting "hide the terms info on node edit page" doesn't come into effect.
- 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf
Hi pemson18, sorry - I do not follow. The config is global. This means that the config controls the form for all users. I think that's the intended behavior. Please provide more context, if you mean anything else.
- 🇮🇳India pemson18 South Goa
Hello Peter,
I have enabled the " Hide terms permissions information in the node form" setting in module settings. Also the permission by default has the been enabled for the admin user, The widget is display differently in the node edit form. It should have overridden the permission "Enables the specific role to see the term permissions on the node edit page" for the admin use and not display the users info in the edit form. Hope I am able to convey this issue properly. - 🇮🇳India pemson18 South Goa
For Admin users the user information is loaded by default which sometimes breaks the side due to records having info 20k+ users. The show "Term permission information on node edit page" overrides the config "Hide terms permissions information in the node form." for admin users which inturn break the page load on Users info 20k+ records
- 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf
Okay, thanks for your input. I do understand, that there is a mismatch between the config and permission setting. Then there should be a permission and config check in the merge request. This should be combined in one if-case. Feel free to provide a merge request and link it here. I can review it.
- 🇩🇪Germany Peter Majmesku 🇩🇪Düsseldorf
Merge request review is easier than patch review. Just hit the "create issue fork" button at the top of this page.