LiveUser and LiveUser_Admin Evaluation

From: Date: Thu, 24 Mar 2005 09:35:18 +0000
Subject: LiveUser and LiveUser_Admin Evaluation
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-18299@lists.php.net to get a copy of this message
Hi, I'm evaluating the LiveUser Autorisation and authenticate against mysql (Every user has a mysql-account - so I DON'T have a passwd line in config) LiveUser_Admin isn't prepared for that yet!? I like the admin example1 - it gives a quick overview. But $admin->getUsers('auth') don't gives me any of my auth users. I see ALL of them in the query log ... WHERE lu_perm_users.auth_user_id = 'xxx' Is there an admin call to "import" all auth-users into perm-users? Permission Medium seems suitable, but there is one special case: We have (sort of) teachers, classes, and pupils. teachers should only see documents of pupils in their classes. Teachers have accounts, pupils don't. The current solution to check permission for teacher 'bob' looking at page 1 of pupil_id 12345 is: $class_id = $db->getOne("SELECT class_id FROM classpupils WHERE pupil_id=12345"); $sql = "SELECT teacher_id FROM teacher_team LEFT JOIN teamclass USING (id_team) WHERE class_id='$class_id' AND teacher_id='bob'"; Mapping between teacher and pupil is: teacher is in a team, which is reponsible for a class of pupils different members of this team have different functions and also different pages to write.
//            Pages         0  1  2  3  4  5  6  7  8
$rights = array ( "area_function03" => array (1, 1, 1, 3, 1, 1, 3, 3, 3), "area_function10" => array (1, 1, 1, 1, 1, 1, 1, 1, 3), ) $right = $rights[$area . $function][$page]; 1 is read permission 3 is write permission To get this scheme to LiveUser, I can emulate functions as groups, but I don't know where to put the pupil-class mapping. Perhaps I should make a class inherited from LiveUser_Perm_Medium? How to deal with read/write? Are Levels suitable? Thanks for that great package. Konrad Riedel

« previous php.pear.general (#18299) next »