From: Jamie C. <jca...@we...> - 2009-07-07 06:43:15
|
There's no flag in webmin_links to control who it is visible to - however, it will be called for each user when the menu is being created, so you can use $remote_user to decide what webmin_links returned. Or better still, call virtual_server::master_admin() to check if the current user is root or equivalent. By the way, plugin docs are at : http://www.virtualmin.com/documentation/id,writing_virtualmin_plugins/ - Jamie On 06/Jul/2009 23:10 Tim Allingham wrote .. Hi Jamie, potentially quite a bit, as when the user has the statistics module enabled, doesn't take long at all to generate a few thousand rows, and after a few weeks into the 100K plus Yeah looks like the best solution will be to disable the user interface till setup, and include the config in admin page as a first-run type output up front. One other question, as the dev docs still seem to be down unfortunately. What setting can be used in the webmin_links sub to enforce a link to only be visible to the root user? It seems to be escaping me at the moment :) Cheers Tim -----Original Message----- From: Jamie Cameron <[1]jca...@we...> Reply-to: Webmin development list <web...@li...> To: Webmin development list <[2]web...@li...> Subject: Re: [webmin-devel] creating a database and random user/pass on module install Date: Mon, 6 Jul 2009 22:44:11 -0700 Hi Tim, How much data will your module be storing in this DB? If it isn't large, you may want to look into using text files instead of a database. This is what Webmin / Virtualmin does, specifically to avoid the problem of setting up dependencies like MySQL. However, if you really want to use a database, prompting the user the first time the module is accessed seems reasonable. You could call the mysql Webmin module to create the user and database. - Jamie On Jul 6, 2009, at 9:12 PM, Tim Allingham <[3]ti...@be...> wrote: > Hi All, > > I'm currently working on a virtualmin/webmin module that works off a > MySQL backend, and am trying to work out how to automate the > following during the module install > > 1) Create a database - name can be static in this case, though > either static or random will be fine > > 2) Import a MySQL dump to the database > > 3) Set up a user with random username and password, and return these > details to the script > > The database is universal, not domain specific for virtualmin, so I > don't believe its something to be handled by the feature_setup sub > in virtual_feature.pl. > > > Is this something that is possible to achieve, or should I include > an install.cgi page that is called if no database details found, for > the setup to be run initially? > > Cheers > > Tim Allingham > --- > --- > --- > --------------------------------------------------------------------- > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a limited > time, > vendors submitting new applications to BlackBerry App World(TM) will > have > the opportunity to enter the BlackBerry Developer Challenge. See > full prize > details at: [4]http://p.sf.net/sfu/blackberry > - > Forwarded by the Webmin development list at [5]web...@we... > To remove yourself from this list, go to > [6]http://lists.sourceforge.net/lists/listinfo/webadmin-devel ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: [7]http://p.sf.net/sfu/blackberry - Forwarded by the Webmin development list at [8]web...@we... To remove yourself from this list, go to [9]http://lists.sourceforge.net/lists/listinfo/webadmin-devel 1. file://localhost/home/webmail/homes/jcameron/.tmp/reply_mail.cgi?new=1&to=Jamie 2. file://localhost/home/webmail/homes/jcameron/.tmp/reply_mail.cgi?new=1&to=Webmin 3. file://localhost/home/webmail/homes/jcameron/.tmp/reply_mail.cgi?new=1&to=tim%40beastpc%2Ecom%2Eau 5. file://localhost/home/webmail/homes/jcameron/.tmp/reply_mail.cgi?new=1&to=webmin%2Ddevel%40webmin%2Ecom 8. file://localhost/home/webmail/homes/jcameron/.tmp/reply_mail.cgi?new=1&to=webmin%2Ddevel%40webmin%2Ecom |