[sagreenstone] Administration Page

Katherine Don kjdon at cs.waikato.ac.nz
Tue Feb 24 23:29:52 EET 2009


(trying again, text didn't come through last time)

Hi Howard and Amos

You can make the administration page require authentication by editing 
the source code.:

Look for runtime-src/src/recpt/statusaction.cpp, and find the following 
method:

bool statusaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, 
cgiargsclass &args,
                  recptprotolistclass * /*protos*/, ostream &/*logout*/) {

  // only users belonging to the "administrator" group may edit
  // the main.cfg file
   if (args["p"] == "maincfg" || args["p"] == "changemaincfg") {
    args["uan"] = "1";
    args["ug"] = "administrator";
     }
  return true;
}

Comment out the if line and end } like so:

bool statusaction::check_cgiargs (cgiargsinfoclass &/*argsinfo*/, 
cgiargsclass &args,
                  recptprotolistclass * /*protos*/, ostream &/*logout*/) {

  // only users belonging to the "administrator" group may edit
  // the main.cfg file
  // if (args["p"] == "maincfg" || args["p"] == "changemaincfg") {
    args["uan"] = "1";
    args["ug"] = "administrator";
    // }
  return true;
}

Then compile the source.

You can add the source code to the 2.81 release by downloading the 
appropriate source code component from
http://www.greenstone.org/download

Instructions on compiling are at
http://wiki.greenstone.org/wiki/index.php/Compiling_Greenstone

I have added a ticket into trac that this is made an option in main.cfg: 
http://trac.greenstone.org/ticket/496

Regards,
Katherine


Amos Kujenga wrote:
> Hi Howard,
>
> Good to hear from you yet again, man!
>
> The Maintenance & Administration facility is disabled by default in
> version 2.81 (whereas it was enabled by default previously). You can
> change this setting (see below) by editing the \etc\main.cfg file.
> After enabling, you'll need to restart the Greenstone server for
> changes to be effected if you're running the local library version.
>
> ************************************
> # Set status to "enabled" if you want the Maintenance and
> # Administration facility to be available.
> status  enabled
> ************************************
>
> As for your second concern, I tend to agree with you that the
> authentication should come before the Admin page is displayed.
> However, I doubt that it is currently possible to have this without
> changing the source code. Maybe we should suggest it for future
> releases!
>
> All the best.
>
> Regards
>
>
> Amos
> Regional Coordinator
> SA Greenstone Support Network
>   akujenga at gmail.com
>   amos.kujenga at eifl.net
>
> On 2/23/09, Howard Hogo <hogoh at africau.ac.zw> wrote:
>   
>> Dear Colleagues
>>
>> It appears as if the new version of Greenstone (2.81) does not have an
>> Administration page on the user interface? How may I execute the functions
>> which were there on previous versions i.e. defining user groups, entering
>> uses and setting authentication on collections?
>>
>> Secondly, it is possible to insert a password so that only authorized users
>> can enter the Administration page, instead of the current facilitate that
>> only restrict one when you are already inside i.e. when wanting to create
>> new users.
>>
>> Regards,
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>>
>> _______________________________________________
>> sagreenstone mailing list
>> sagreenstone at lists.eifl.net
>> http://www.eifl.net:8080/mailman/listinfo/sagreenstone
>>
>>     
> _______________________________________________
> sagreenstone mailing list
> sagreenstone at lists.eifl.net
> http://www.eifl.net:8080/mailman/listinfo/sagreenstone
>   



More information about the adlsngreenstone mailing list