Problem/Motivation

As a best practice it is recommended to introduce an own permission to access the settings form.

Proposed resolution

Add youtubechannel.permissions.yml to the module a define an administer youtubechannel persmission.
Set this permission as a requirement to the youtubechannel.settings route.

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

sunlix created an issue. See original summary.

sunlix’s picture

Status: Active » Needs review
anjuelsaphilip2020’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new81.46 KB
new68.76 KB

Hi, I’ve verified and tested MR!14 and applied the patch successfully on the YoutubeChannel 8.x-3.x-dev version. The changes are working as expected.
Following steps I followed:

  1. Go to People → Roles → Permissions
  2. Verified that the new permission “administer youtubechannel” is available
  3. Assigned the permission to a test role
  4. Created a user with this role and logged in
  5. Tried accessing the YouTube Channel settings page

Testing Result:After applying the patch, the new permission “administer youtubechannel” is successfully added, allowing users with the permission to access the settings page while restricting access for users without it.

Attaching screenshots for reference.
Thanks

i-trokhanenko made their first commit to this issue’s fork.

i-trokhanenko’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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