logo       

Re: Display "Config file" link only to admins: msg#00259

sysutils.backup.backuppc.general

Subject: Re: Display "Config file" link only to admins

Kanwar Ranbir Sandhu writes:

> First of all, I would just like to say that BackupPC is an excellent
> application. We've deployed it to do backups for our internal machines,
> as well as for our clients. I took a look at some of the other backup
> solutions, and aside from AMANDA (which we deploy for clients if they
> want local tape backups), BackupPC was the only one that met our
> requirements. The web interface is perfect for our clients (as well as
> for us). Configuration was also straightforward. I can't say enough -
> I love it!

Thanks for the feedback.

> As much as I like it, I'm not a programmer, so I was hoping someone here
> could help me out. We want to hide the "Config file" link in the
> interface from everyone that isn't an admin: I don't think it's
> necessary for anyone else to see the config files. I believe I've
> located the relevant snippet of code from Lib.pm:
>
> if ( -f "$TopDir/pc/$host/config.pl" ) {
> NavLink("?action=view&type=config&host=${EscURI($host)}",
> $Lang->{Config_file}, " class=\"navbar\"");
> }

Yes, those are the correct lines from lib/BackupPC/CGI/Lib.pm.
There is a variable $PrivAdmin that is set only for admins, so
change the "if" statement to:

if ( $PrivAdmin && -f "$TopDir/pc/$host/config.pl" ) {

> It would be great if in future releases the "Config file" link, and
> perhaps even all of them, were configurable from the main config.pl file
> like the ones for the Documentation etc. A RFE, I suppose. :)

The next version will have config editing, so the "View Config" will
get replaced with an "Edit Config" (or perhaps I'll have both). It
makes sense for those links to be configurable. I'll consider whether
it makes sense for other host-specific links to be configurable too.

Craig


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
BackupPC-users mailing list
BackupPC-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise