How To Change admindb URL

Asked by cmnorton

This is related to # Question #113482

I have changed admin to lsadmin. That works fine.

How do I remap /mailman/admindb/<my_list> ?

I'm getting this from going to list moderation. I could try to remap the URL, but am hoping that like changing admin to lsadmin with the link suggestion?

And again, thanks for your help.

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Mailman Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Sapiro
Solved:
Last query:
Last reply:
Revision history for this message
Best Mark Sapiro (msapiro) said :
#1

If you want to change the admindb URL in the same way you changed the admin URL, you have to do the same thing: I.e. change the name of the $prefix/cgi-bin/admindb wrapper and change the name in all the places in the code that call the GetScriptURL('admindb', ...) such as

$ grep -rn "GetScriptURL('admindb'" .
./cron/checkdbs:116: 'adminDB' : mlist.GetScriptURL('admindb', absolute=1),
./Mailman/Cgi/admin.py:412: otherlinks.AddItem(Link(mlist.GetScriptURL('admindb'),
./Mailman/Cgi/admindb.py:176: doc.AddItem(Link(mlist.GetScriptURL('admindb', absolute=1),
./Mailman/Cgi/admindb.py:183: admindburl = mlist.GetScriptURL('admindb', absolute=1)
./Mailman/Cgi/admindb.py:392: admindburl = mlist.GetScriptURL('admindb', absolute=1)
./Mailman/Handlers/Hold.py:232: 'admindb_url': mlist.GetScriptURL('admindb', absolute=1),
./Mailman/ListAdmin.py:399: 'admindb_url': self.GetScriptURL('admindb', absolute=1),
./Mailman/ListAdmin.py:454: 'admindb_url': self.GetScriptURL('admindb', absolute=1),
$

Rather than finding and changing all the GetScriptURL('admindb', ...) calls, you could change the definition of the method in Mailman/MailList.py from

    def GetScriptURL(self, scriptname, absolute=0):
        return Utils.ScriptURL(scriptname, self.web_page_url, absolute) + \
               '/' + self.internal_name()

to something like:

    def GetScriptURL(self, scriptname, absolute=0):
        if scriptname in ('admin', 'admindb'):
            scriptname = 'ls' + scriptname
        return Utils.ScriptURL(scriptname, self.web_page_url, absolute) + \
               '/' + self.internal_name()

Revision history for this message
cmnorton (octopusgrabbus) said :
#2

Sorry. did not work.

I had to put in a URL re-route for it, but I still get the error page.

I tried the changes above, but got there is no URL, even when I routed.

In the case of admindb, I'm not sure I have to rename anything, because it's unlike any URL in Power School, which is why the original ticket was opened a few weeks ago. The error page keeps coming up, but I'm not finding all that much useful in the error page.

Revision history for this message
Mark Sapiro (msapiro) said :
#3

I agree you don't have to rename anything if admindb is not a conflict.

What error page?

Revision history for this message
cmnorton (octopusgrabbus) said :
#4

If I click on admin options, I get the Bug
PDFs of both pages attached.

 Charles M Norton
Database Programmer/Systems Integrator

----- Original Message ----
From: Mark Sapiro <email address hidden>
To: <email address hidden>
Sent: Mon, June 21, 2010 11:31:45 AM
Subject: Re: [Question #115133]: How To Change admindb URL

Your question #115133 on GNU Mailman changed:
https://answers.launchpad.net/mailman/+question/115133

    Status: Open => Needs information

Mark Sapiro requested for more information:
I agree you don't have to rename anything if admindb is not a conflict.

What error page?

--
To answer this request for more information, you can either reply to
this email or enter your reply at the following page:
https://answers.launchpad.net/mailman/+question/115133

You received this question notification because you are a direct
subscriber of the question.

Revision history for this message
Mark Sapiro (msapiro) said :
#5

Your attachments don't come through to either the web page or the email notices.

If you are seeing the "we hit a bug" page, go to Mailman's error log and find the complete error message with traceback and post that, and if you reply by email, paste it in the email body.

Revision history for this message
cmnorton (octopusgrabbus) said :
#6

My bad. A malformed line in Mailman/Handlers/Moderate.py.
Again, thanks for your help.

Revision history for this message
cmnorton (octopusgrabbus) said :
#7

Thanks Mark Sapiro, that solved my question.