Adding settings for URL prefix and random URI part

fuerst - March 18, 2008 - 11:34
Project:URL Access
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

While using this module I wanted to (1) replace the default URL prefix protected by a free configurable string and (2) use a shorter random URI part because the UUID with 37 characters is too long for sending to customers etc.

May be my patch is useful for the public so I attached it here. It enhances url_access by the following features:

  • Choose how to generate the random part of the URI: using the UUID() function of MySQL or the user_password() function of Drupal.
  • Because the UUID() function is available from MySQL 4.1.2 on only the user_password() function will be used as a fallback if UUID() is not available.
  • The URL path prefix for protected nodes which is by default protected is configurable.
  • You may enter an additional message for the 403 page which unauthorized users will see when viewing the node without using the protected URL.
AttachmentSize
settings.patch5.1 KB

#1

fuerst - March 18, 2008 - 11:35
Status:active» needs review

#2

deviantintegral - April 22, 2008 - 16:38

Thanks for the patch. A few comments:

  • Generating the UUID in 'insert' in the nodeapi hook would be clearer if it simply called the _url_access_uuid() function. It could then handle checking the variable to see what is appropriate.
  • Actually, couldn't the UUID() function be tested during generation of the admin form, and then disable the option if the function isn't available?
  • What happens if you change the URL prefix when existing pages? As far as I can tell from the code (I haven't run it yet) you would have to manually submit every node to update the path alias table.

--Andrew

#3

deviantintegral - April 22, 2008 - 16:38
Status:needs review» needs work

#4

drewish - April 30, 2008 - 00:17

it also looks like there's some white space issues with tabs being used rather than spaces.

#5

deviantintegral - October 26, 2009 - 19:50
Status:needs work» won't fix

I'm marking as closed to clean up my queue as I'm not maintaining this module any more. Feel free to take over this project if you're still using it.

 
 

Drupal is a registered trademark of Dries Buytaert.