I was slightly confused when I received an "Access denied" page when clicking on the "Reset to alphabetical order"-button, although I had the permission to reorder items. After a quick peek in the code, I noticed that TAF has no influence on that one. The patch included will add that specific route to the RouteSubscriber and check it agains the "Reorder terms"-permissions and it will remove the button if the user doesn't have that specific permission.

Comments

LammensJ created an issue. See original summary.

rudiedirkx’s picture

Category: Feature request » Bug report

If I don't have access, I don't see the buttons, so I don't think

$form['actions']['reset_alphabetical']['#access'] = FALSE;

is necessary.

If I do have access, I don't have access. Very very sloppe for a module that's supposed to fix access =) Mea culpa.

I'll try the patch soon.

rudiedirkx’s picture

Status: Needs review » Fixed

The #access isn't necessary because a few lines below:

  if (!$can_reorder) {
    // Hide Save and Reset buttons.
    $form['actions']['#access'] = FALSE;

which hides the reset button too.

Used the other part though. Fixed in dev. Thanks!

rudiedirkx’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.