Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 02:52:03 AM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: User Group relationship  (Read 3556 times)
tomhung

Offline Offline

Posts: 353


« on: July 25, 2007, 04:35:25 PM »

This is sort of a Request.  It will prob have to wait till WB3 but i'll ask for it anyway.

I would like to see a many to many relationship between users and groups.  currently you can only allow a user to be in one group.  I have seen many situations where it we need the flexibility to have users in different / multiple groups.  just a thought for the Core Developers!

G

PS.  Almost every time i build a 1-M relationship in a app the user thinks up a situation where they would need a M-M relationship.  I know its not trivial to make these changes.  This has forced me to ask "can there EVER be a need for the M-M?" if so go ahead and model the data so it can have a M-M.
Logged
nickopotamus

Offline Offline

Posts: 2


« Reply #1 on: October 06, 2007, 02:19:44 PM »

I'd also be very interested in this - especially if there are any work arounds...
Logged
tavitar

Offline Offline

Posts: 9


« Reply #2 on: December 19, 2007, 10:21:13 PM »

Hi,

I've made a patch for 2.7.6 which enables users to be members of multiple groups.

http://wb-mods.lism.catholic.edu.au/pages/patches.php

Let me know if you need help for have suggestions.

Regards,
David
Logged
pcwacht
Guest
« Reply #3 on: December 20, 2007, 06:19:58 PM »

@Tavitar
The LDAP validation, can it be used against several ldaps, or maybe connect to a ldap and import that one overwriting previous importations?
Reason, I work at school (holland)
We have different schools in one group, each school runs its own windows domain
Importing or validating against several domains (ldaps) would come in handy for an intranet

And
Could you post the changed files for the user in multiple groups so I (we) can have a look at it?
Think it is a must feature for wb 2.7

Thanks in advance,
John
Logged
tavitar

Offline Offline

Posts: 9


« Reply #4 on: January 07, 2008, 01:53:17 AM »

Hi John,

Sorry, it will only authenticate against one LDAP server. Although, i don't think it'd be too difficult to check against multiple by changing /account/login_ldap.php.

The patch itself contains the changes as text (in gnu diff format). I've also uploaded a version of website baker with patches already applied if that helps (you could use http://winmerge.org or similar to view changes): http://wb-mods.lism.catholic.edu.au/media/websitebaker-2.6.7-ldap.tar.gz

Regards,
David
Logged
FrankH

Offline Offline

Posts: 735


WWW
« Reply #5 on: September 26, 2008, 10:45:19 AM »

The ldap patch requires a file in the wb root directory.
I wondered what happens when a user calls this file directly.

On my test system, he gets an answer like
Parse error: syntax error, unexpected T_VARIABLE in E:\xampplite-win32-1.6.7\xampplite\htdocs\ldap_config.php on line 4

This means it reveals the name of the install directory to the user, which is a Bad Thing from a Security point of view. Is there a way to change this?
Logged

Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf
vyni

Offline Offline

Posts: 566


« Reply #6 on: September 26, 2008, 02:26:09 PM »

Hi,
I don´t understand anything of this all....

But there are a lot of files within WB with a code like this:
Code:
// prevent this file from being accessed directly in the browser (would set all entries in DB settings table to '')
if(!isset($_POST['default_language']) || $_POST['default_language'] == '') die(header('Location: index.php')); 

MAybe this does the job?
Logged

PS: Falls jemand eine Idee hat was zu tun ist und mir das erklären könnt - geh bitte davon aus dass ich ahnungslos bin, was php und so betrifft. Ich kann grad was lesen, kopieren und einfügen,  ungefähr verfolgen und glauben.
SourDough

Offline Offline

Posts: 47


WWW
« Reply #7 on: September 26, 2008, 02:40:31 PM »

I haven't looked at the code, but I think what you are looking for is the inclusion of the following code:

// Must include code to stop this file being access directly
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }

Nick
Logged
FrankH

Offline Offline

Posts: 735


WWW
« Reply #8 on: September 30, 2008, 08:31:20 AM »

Both suggestions above do not work, the user still receives the name of the install directory in the error report, which he should not get. The only thing what changed was the line number.
Logged

Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf
SourDough

Offline Offline

Posts: 47


WWW
« Reply #9 on: September 30, 2008, 02:38:23 PM »

I installed the WB-2.6.7 (linked above) with the patch already applied, and tried browsing to http://locahost/wb/ldap_config.php and all I get is a blank page.  I'm running this on USB Webserver v7.0 with the default settings.  I tried changing display_errors = On in the php.ini, and I still received a blank page browsing to the ldap_config.php file. 

Can you check and see what your error reporting is set to in your php.ini?  Perhaps turn display_errors = Off, as this is the best setting for a secure setup. 

Also, what is on line 4 of your ldap_config.php, or could you post a sanitized version of your ldap_config.php. 

And finally, despite this problem, is your WB authenticating to ldap successfully? 

Nick
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!