First of all thanks for a great module that has been useful in several projects.
One thing that has me wondering - and has confused me as well as several users - is the presence of a "Save Grants" button when there are no grants to save - in other words when there is no user table.
People (myself included) will start typing a user name, select the appropriate name and push "Save Grants". Sure, there are no grants to save, that's pretty obvious, but having to press "Search" (which doesn't search, but adds the user to the table) and then "Save Grants" doesn't seem logical to me. There might be reasons for this structure that I haven't seen, but my experiments with moving it has led to no problems.
The "Search" button ought to be called "Add User" in my eyes and the "Save Grants" button ought not to be showed before there are actual grants to be saved.
The first is a simple text change, the second is a question of moving the submit button form item inside the block that starts in line 738 in nodeaccess.module
// Users table.
if (is_array($users)) {
...
}
I have moved the button from the bottom of the form code and inside this block and added a trigger on the number of users, like this:
if (count($users)) {
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save Grants'),
);
}
It seems to work and might be worth a consideration. It tightens up the UI and confuses fewer users.
Just a suggestion.
Martin
Comments
Comment #1
d.fisher commentedDrupal 7 security support has ended as of 5 January 2025.
We are doing some housekeeping on the nodeaccess issue queue and moving all Drupal 7 issues to "postponed (maintainer needs more info)". See https://www.drupal.org/project/nodeaccess/issues/3516593.
If this issue persists on the latest dev branch of nodeaccess (2.0.x-dev) then please feel free to comment and we will change the version against this issue. If we do not hear any feedback within 2 weeks (9th October 2025) we will go ahead and close this issue as outdated.
Thank you.
Comment #2
d.fisher commentedAs per the above, as there has been no response we will now close this issue as outdated.
If this issue persists on the latest dev branch of nodeaccess (2.0.x-dev) then please feel free to update the version on this issue and reopen it.
Thank you.