Problem/Motivation

In flood unblock form page there is a link called "Flood Control settings page" to access settings page.
If you click on it with any role other than the administrator, it will redirect to access denied.
So, hide it if the current user is not an administrator.

Steps to reproduce

  1. Click on Flood unblock link.
  2. At the top of the page there is a top markup contain a link to Flood control settings page.
  3. Click on it.
  4. It will redirect you to access denied if you are not an administrator.

Proposed resolution

  1. Create a new permission to allow users access Flood control settings page.
  2. Sepatate form top markup text into 2 items.
  3. First one for message without link.
  4. second one for link and it will appears if the user has this permission.

Remaining tasks

User interface changes

Before:-

After:-

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Abdullah Yassin created an issue. See original summary.

Abdullah Yassin’s picture

Issue summary: View changes

Abdullah Yassin’s picture

Status: Needs work » Needs review
StatusFileSize
new11.85 KB
new17.37 KB

Here are the changes:
1 - This is the markup before adding the permission to the user.
Without permission

2 - And this is the markup after adding the permission to the user.
With permission

Abdullah Yassin’s picture

Title: Remove "Flood Control settings page" from top markup if user doesn't has a permission » Better to hide "Flood Control settings page" link from top markup if the user doesn't has a permission
Abdullah Yassin’s picture

Please review it and I'll be happy and proud if these changes are committed.

rajab natshah’s picture

Abdullah Yassin’s picture

StatusFileSize
new3.74 KB

Commit "25c1ecad" patch:
18-3270116#8.diff

alaa jwiehan’s picture

Issue summary: View changes
alaa jwiehan’s picture

Status: Needs review » Reviewed & tested by the community

fabianderijk made their first commit to this issue’s fork.

fabianderijk’s picture

Status: Reviewed & tested by the community » Fixed

This is now merged into the 2.2.x branch

Status: Fixed » Closed (fixed)

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