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
- Click on Flood unblock link.
- At the top of the page there is a top markup contain a link to Flood control settings page.
- Click on it.
- It will redirect you to access denied if you are not an administrator.
Proposed resolution
- Create a new permission to allow users access Flood control settings page.
- Sepatate form top markup text into 2 items.
- First one for message without link.
- 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
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 18-3270116#8.diff | 3.74 KB | Abdullah Yassin |
| #4 | with-permission.png | 17.37 KB | Abdullah Yassin |
| #4 | without-permission.png | 11.85 KB | Abdullah Yassin |
| Screenshot from 2022-03-17 16-34-58.png | 16.73 KB | Abdullah Yassin |
Issue fork flood_control-3270116
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
Comment #2
Abdullah Yassin commentedComment #4
Abdullah Yassin commentedHere are the changes:

1 - This is the markup before adding the permission to the user.
2 - And this is the markup after adding the permission to the user.

Comment #5
Abdullah Yassin commentedComment #6
Abdullah Yassin commentedPlease review it and I'll be happy and proud if these changes are committed.
Comment #7
rajab natshahComment #8
Abdullah Yassin commentedCommit "25c1ecad" patch:
18-3270116#8.diff
Comment #9
alaa jwiehan commentedComment #10
alaa jwiehan commentedComment #13
fabianderijkThis is now merged into the 2.2.x branch