|
From: Jamie C. <jca...@we...> - 2001-04-02 12:56:43
|
Joe Cooper wrote:
>
> Jamie Cameron wrote:
>
> > Joe Cooper wrote:
> >
> >> Ok, I'm getting better at figuring out what needs to go into a
> >> hash...but not good enough to figure out how the Webmin Users
> >> &create_user function works.
> >>
> >> I've gathered, I think, almost everything I need in the %user hash when
> >> calling &foreign_call("acl", "create_user", \%user). But I'm having
> >> issues with the ACLs for the modules, mainly because I can't figure out
> >> how to print the modules array within the hash so I can see what it
> >> looks like.
> >>
> >> So, how do I generate a correct array of modules to be added for my new
> >> user? As in the previous system user generation query, I'm creating the
> >> user from nothing but the name and a template.
> >
> >
> > Basically, the create_user function takes a reference to a hash \%user that
> > contains the following important keys
> >
> > name - The user's login name
> > pass - The crypt() encrypted password
> > modules - A reference to an array of modules that the user will have access to
>
> Ok. I think I've got it. And modules are just listed as elements in
> the array: 'apache', 'sendmail', etc. (Without the quotes.) Correct?
Yes .. for example, a %user hash could be constructed like this :
%user = ( 'name', 'jcameron',
'pass', 'dfsdfafdsfs',
'modules', [ 'acl', 'apache', 'squid' ] );
- Jamie
|