Jump to content

Recommended Posts

Posted

Hi! I am new to processwire and really like working with it so far.

For a relaunch project, some editors of our website need the permission to add redirect URLs while migrating the content. I already created a role "site-manager" so only a few team members have access to certain features.

There is also the option to add redirect URLs in the page settings, but it seems to be restricted only to superusers. Does anyone know of a way to grant permission for this option to another user role?

Since this is the first PW-Project I did not dive in too deep with the permissions yet. I also tried to add a "page-edit-redirect"-permission, but I am somehow stuck on what to do with it.

Thanks

Posted

Fields can be configured to have access level per role. If you edit the redirect field, go into the Access tab and enable access control, you can enable the fields you need for certain roles. 

Posted

Welcome to the PW forum @Slideth. As far as I know, adding redirects directly from a page's setting is not a core-feature. Can you find out if this is a module? Or maybe done with a hook (?). If it's a module, you should try to find its own dedicated module support forum and ask there.

But generally speaking, check this redirect-field setting under "access", maybe you can define things right there...

  • Like 1
Posted
11 hours ago, Slideth said:

I had another look at it and found out that it's the PagePathHistory-Module

This feature is only available to superusers. See the blog post that introduced it: https://processwire.com/blog/posts/processwire-3.0.118-core-updates/#new-redirect-url-management-in-the-page-editor

Quote

Note that it is currently only visible to the Superuser.

If the setting of redirect URLs is just a temporary need while the site is being migrated you could edit the relevant lines of the ProcessPageEdit module. Or copy the module folder to /site/modules/ and make the change there. E.g.

// page path history (previous URLs)
if($superuser || $this->wire('user')->hasRole('editor')) {
	$f = $this->buildFormPrevPaths();
	if($f) $wrapper->add($f);
}

But you wouldn't want to leave this in place long term because it will mean you won't get core fixes or upgrades to ProcessPageEdit.

  • Like 1
Posted

Thank you very much @Robin S. I think that will do for the migration process. Seems I missed that blog post you mentioned while searching for a solution.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...