Re: [EMAIL PROTECTED] find out group-membership with php

2008-09-16 Thread Tony Stevenson
Nick Kew wrote: > Lentes, Bernd wrote: > >> In php it's possible to find the username with getenv("REMOTE_USER"). >> Is there a possibility to find out the group with something similar ? > > Define what you mean by group, and it should become clear. > > (Clue: the answer is 42 - and if you're to

Re: [EMAIL PROTECTED] find out group-membership with php

2008-09-15 Thread Nick Kew
Lentes, Bernd wrote: In php it's possible to find the username with getenv("REMOTE_USER"). Is there a possibility to find out the group with something similar ? Define what you mean by group, and it should become clear. (Clue: the answer is 42 - and if you're too young to know what that means

Re: [EMAIL PROTECTED] find out group-membership with php

2008-09-15 Thread Bradley Giesbrecht
On Mon, Sep 15, 2008 at 2:36 PM, Bradley Giesbrecht <[EMAIL PROTECTED]> wrote: You need to get a little inventive here. .htaccess: SetEnv dir_groups "system|managers|sales" # pipe delimited Not so useful as it doesn't tell you which one your user is a member of. Authorization info doesn't

Re: [EMAIL PROTECTED] find out group-membership with php

2008-09-15 Thread Eric Covener
On Mon, Sep 15, 2008 at 2:36 PM, Bradley Giesbrecht <[EMAIL PROTECTED]> wrote: > You need to get a little inventive here. > > .htaccess: > SetEnv dir_groups "system|managers|sales" # pipe delimited Not so useful as it doesn't tell you which one your user is a member of. Authorization info doesn

Re: [EMAIL PROTECTED] find out group-membership with php

2008-09-15 Thread Bradley Giesbrecht
You need to get a little inventive here. .htaccess: SetEnv dir_groups "system|managers|sales" # pipe delimited something.php: " . print_r ( $dir_groups , true ) . "" ) ; ?> browser result: Array ( [0] => system [1] => managers [2] => sales ) //Brad On Sep 15, 2008, at 11:18 AM,

Re: [EMAIL PROTECTED] find out group-membership with php

2008-09-15 Thread André Warnier
Bradley Giesbrecht wrote: Looks like you could add something like this to your .htaccess: SetEnv dir_group "group_name" That would work, but only if "group_name" is the only group that could have access to that directory. If there are several groups, then it does not work anymore, because yo

Re: [EMAIL PROTECTED] find out group-membership with php

2008-09-15 Thread Bradley Giesbrecht
Looks like you could add something like this to your .htaccess: SetEnv dir_group "group_name" then you should have $_SERVER[ 'dir_group' ] available to you in php. I'm no security expert and I had to change AllowOverride to "All" or probably "SetEnv" in my directory block and this may be a se

Re: [EMAIL PROTECTED] find out group-membership with php

2008-09-15 Thread Bradley Giesbrecht
I don't know the answer to your question but have you considered using php for authentication and access control? Your probably better off using $_SERVER then getenv(). Put this at the top of a php page to see what is available. die ( "" . print_r ( $_SERVER , true ) ) . "" ) ; Brad On Sep

[EMAIL PROTECTED] find out group-membership with php

2008-09-15 Thread Lentes, Bernd
hello, we created a website with content which should be presented differently, according to group-membership. We did this with AuthGroupFile in a .htaccess. For static html-pages it worked fine. We want now to generate dynamic content. In php it's possible to find the username with getenv("REMOT