-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Patrick,

An easy way to make all users a member of a specific group would be to add the 
following line to authmethods/ldapauth.php right after "//TODO possibly add to 
a default group":

updateGroups(array(getUserGroupID('All Users', $user['affiliationid'])), 
$user['id']);

This will result in each affiliation having an "All Users" group that all
users from that affiliation would be members of.  If you only want a single
group instead of one for each affiliation, just hard code the second argument 
to getUserGroupID instead of using $user['affiliationid'].

As a side note, remember that once you start to make changes to the code, 
you've made your upgrade path a little more difficult.  The easiest way to 
find the changes you made to then make the same changes to a new version of 
the code is to download a fresh copy of the version you have running, and 
then do a diff between that and your running code.  Then, make the same
changes to the new version, and you should have your modifications applied
to the new version.  Even better, make patches for your changes and then 
just apply them to the new version.

Josh

P.S. I didn't actually test that line of code.  :)

On Friday February 11, 2011, James Patrick Sigmon wrote:
> Hey Guys,
> 
> I've been adding in different colleges into VCL via LDAP and plan to
> eventually have it so that it groups like you have at NC State.  However,
> to start I'm just interested in at least giving everyone the same basic
> access to a few images.  I was wondering how I could easily go about doing
> this.  As I stand right now, I can login via LDAP but don't have any
> privileges yet.  I have hunch this will involve the privilege tree and
> some grouping, but also editing a few files (perhaps authentication.php,
> and ldapauth.php).  Again, I'm not sure and any advice would be helpful.
> 
> Thanks,
> 
> Patrick Sigmon
- -- 
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University

my GPG/PGP key can be found at pgp.mit.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk1VgIoACgkQV/LQcNdtPQNIggCbBW4rHCAA/+MWboNUWCzhu9YM
e+oAniTpKdBK+XPb8WwoEAQ7c2NquLGE
=d74X
-----END PGP SIGNATURE-----

Reply via email to