Home » Authentication » LiveUser_Admin
User authentication and permission management framework
This package is unmaintained.
Download latest release 0.4.0 (archived versions might be outdated)
License: LGPL
Description
LiveUser_Admin is meant to be used with the LiveUser package.
It is composed of all the classes necessary to administrate
data used by LiveUser.
You'll be able to add/edit/delete/get things like:
* Rights
* Users
* Groups
* Areas
* Applications
* Subgroups
* ImpliedRights
And all other entities within LiveUser.
At the moment we support the following storage containers:
* PEAR::DB
* PEAR::MDB
* PEAR::MDB2
* PECL::PDO
But it takes no time to write up your own storage container,
so if you like to use native mysql functions straight, then it's possible
to do so in under a hour!
Maintainers
- Markus Wolff (mw21st) — lead, active
- Arnaud Limbourg (arnaud) — lead, active
- Lukas Kahwe Smith (lsmith) — lead, active
- Helgi Þormar (dufuz) — lead, active
- Matthias Nothhaft (mahono) — developer, active
Dependencies
Required
Optional
Releases
- 0.4.0 (beta, 2010-10-05)
Release notes
License: LGPL
QA release
Bug #13233 Example1 error when importing data in DB
Bug #11051 Seems class variable is not declared
Bug #8424 incorrect handling of single column joins - 0.3.9 (beta, 2006-08-22)
Release notes
License: LGPL
- pass debug parameter by ref to the constructor since it can be an object instance
- updated API calls of getBeforeId() and getAfterId() in the storage classes
- refactored decryptPW() and encryptPW() into static methods in the LiveUser class
- force null instead of false for PDO fetch() calls that return empty sets
- added static error push when a non array is passed to setSelectDefaultParams() (Request #7779)
- use empty() instead of array_key_exists() in setSelectDefaultParams()
- update of auth_user_id not possible via LiveUser_Admin::updateUser() (Bug #7975; thx to Matthias)
- fixed incorrect handling of single column joins (Bug #8424)
- better handling of '*' inside the field list together with explicit fields (Bug #7955) - 0.3.8 (beta, 2006-04-19)
Release notes
License: LGPL
- wrong parameter used in getUsers('auth', ..) (report by gregory)
- fixed usage of outdated getUsers() API in init()
- phpdoc fix in outputRightsConstants() (bug #7037)
- removed bogus parameter from phpdoc in getRights() in medium/complex container
- added support for selectable_tables in the param array in get*() methods
- fixed updating of implied right field in umimplyRight() (bug #7050)
- made stack property public
- remove artificial limitation that prevented groups to have multiple parents
- fixed PDO storage layer queryAll() method (bug #7213)
- expanded error handling in Log instance creation
- fixed outdated API call to getRights() in _getInheritedRights() (bug #7236)
- made translations columns wider for example1
- replace isset() with array_key_exists() where applicable
- added link to area admin area test to the menu in example1
- reworked getRights() and getGroups() API for recursive reads
(related to bug #7241) *BC break*
Set the filter parameters for the recursion explicitly. For getGroups() in the
'subgroups', 'hierarchy' keys (note that hierarchy is now no longer specified
by setting 'subgroups' => 'hierarchy'). For getRights() 'inherited', 'implied'
and 'hierarchy' (note that hierarchy is now no longer specified by setting
'implied' => 'hierarchy';).
- expanded outputRightsConstants() filtering
- changed the getUsers(), addUser() and updateUser() API to be more in line
with the container APIs *BC break* (req #7025)
- added LiveUser_Admin_Storage::setSelectDefaultParams() to centralize default setting
- added selectable_tables property to auth backend
- fixed typos in 'with' handling in the perm container
- prevent duplictate entries in the fields not yet linked array - 0.3.7 (beta, 2006-02-21)
Release notes
License: LGPL
- fix "No rights for a user if the user only has inherited rights" (bug #6374)
- do not overwrite all filters in _get*() helper methods
- minor issue with 'alias' position in the config array in example1
- make sure that tables required as intermediate join steps are listed in the from
- add depth parameter to createJoinFilter (may be used to determine shortest join path eventually)
- fixed detection if list of tables has been reduced or not
- do not push an error on the stack for a possible recursion because it may just
be one possible path we are evaluating
- added "by_group" optional parameter to params getRights() which determines if
the userrights table should be used or rather the grouprights and groupupsers tables
- incorrect handling of filters inside unimplyRights() (bug #6592)
- renamed "connection" config option to "dbc" *BC BREAK*
- cleaned up and unified init() in the storage classes
- added support for '*' in fields list as an alias to fetch all fields in the root table
- made LiveUser_Admin::getUsers() API as flexible as in the containers *BC BREAK*
- fixed serious issue in join filter handling that caused join filters to be ignored
- removed allowDuplicateHandles and allowEmptyPasswords options, they are now
handled through the table definition in the given Globals.php (overwriteable
via the config array) *BC BREAK*
- typo fix in extended module loading in the MDB2 storage container
- fixed inherited and implied handling in getRights() when fetching only 2 columns
- added initial version of a PDO storage container (needs more testing)
- removed setCurrentApplication()/getCurrentApplication() methods since they are
no longer relevant *BC BREAK* - 0.3.6 (beta, 2005-12-21)
Release notes
License: LGPL
- dont raise an error when no user is found in getUsers() helper method (bug #5690)
- fixed bug in handling of _checkExplicitTable() return value in findTables() (bug #5706)
- tweaked error messages for failed factory method calls
- renamed query() to exec() to match the MDB2 RC1 API
- use exec() instead of query()
- handle database structure merging inside the Storage class
(previously handled in the auth/perm backend drivers)
- improved sanity checking in insert and update when values for undefined fields are passed
- do nothing in update() if an empty data array is passed
- required fields may not be unset, but may be empty strings
(corrected overly strict check in update() method)
- owner_*_id is no longer necessary for the tests
- leave owner_user_id management to the developer
- tweaked errors messages in insert() and update()
- in createJoinFilter first work through all the direct matches before recursing
- typo in loadModule call in the MDB2 backend (bug #6092)
- removed loginTimeout feature (disable lastlogin if you are concerned about
the cost of updating the lastlogin time)
- tons of phpdoc and whitespace fixes and additions
- updated API calls to LiveUser to version 0.16.8
- renamed setAdminContainers() to init() - 0.3.5 (beta, 2005-10-10)
Release notes
License: LGPL
- only alias orders fields if needed (bug #5310)
- fixed warning in _getGroupsWithHierarchy() if filters match no group
- several typo fixes in getGroups() in the complex container
- several fixes to getRights() in the complex container (bug #5453)
- added test.php to the linkbar in example1
- removed autoInit (call setAdminContainers() manually instead) *BC BREAK*
- reworked log/debug handling (there is a new 'debug' conf option which can
either be a bool or a log instance)
- made the log property public which made it possible to remove addErrorLog()
- use static LiveUser::PEARLogFactory instead of loadPEARLog() - 0.3.4 (beta, 2005-09-02)
Release notes
License: LGPL
- fixed typo error in sanity checking of the SQL storage layer update() method
- fixed bug in the SQL storage layer insert() method that would lead to the
sequence value not being returned if it was set externally. this for example
leads to broken behaviour in the addUser() wrapper method in LiveUser_Admin
- added error handler to example1 so that notices and warnings will not go
unnoticed so easily in the large output - 0.3.3 (beta, 2005-08-17)
Release notes
License: LGPL
- typo fix in phpdoc (bug #5054)
- removed space in the example1 directory name
- ensure that fields are properly aliased (bug #5059)
- added an aliased field to exampl1 so that we can better test liveuser_admin
- several CS fixes
- removed uncessary optional dependencies on XML_Tree and Crypt_RC4
- fixed issue in upate() handling in the storage of required fields
- supress errors due to deleting non existant tables in example1
- fixed bug in setFetchMode() calling in example1
- removed warning about extra_sql.sql in example1
- pass the storage config array by ref after all - 0.3.2 (beta, 2005-08-09)
Release notes
License: LGPL
- copy storage config before passing it to the storageFactory() since this
method messes with the values which causes the original to be modified due to
using pass by reference
- removed old 'with' handling code that is no longer necessary from getGroups()
in the medium container - 0.3.1 (beta, 2005-07-20)
Release notes
License: LGPL
- php 4.4 reference assignment fixes
- dont filter out subgroups from the previous level in
_getGroupsWithHierarchy() (bug #4860) - 0.3.0 (beta, 2005-06-21)
Release notes
License: LGPL
- added _call() overloading method for php5 users in LiveUser_Admin class
- dont require a conf array for all but the first call of singleton()
- updated LiveUser dependencystorage
- delete() now uses findTable() to ensure that only defined table with the
proper fields are being used
- findTable() now only prefixes fields if necessary
- added ability to prefix explicit tables in findTables()
- no longer use "ids" in insert so we can remove this information from the
Globals.php file in the client
- added support for table name aliasing
- tweaked NULL value handling in createWhere() (bug #4638)authentication
- typo fix (bug #4109)
- typo fix (bug #4173)
- moved to admin storage class
- tweaked disconnect to only disconnect when a new connection was madepermission
- typo fix: hierachy -> hierarchy (bug #4150)
- improved the "with" support (fixing bug #3245)
- tweaked disconnect to only disconnect when a new connection was made
- fixed bug that would lead to hierarchy mode in getGroups only fetching the
first subgroup level (bug #4633)examples
- examples were converted to use MDB2_Schema. See the demodata.php script found
in the client part (http://cvs.php.net/co.php/pear/LiveUser/docs/examples/demodata.php)
- removed the test.php script since this code is outdated and serves no purpose any longer
- updated examples to use the new auth config layout due to using admin storage
- tweaked error handling on init() call - 0.2.1 (beta, 2005-03-30)
Release notes
License: LGPL
- typo fix in autoinit option (bug #3844)
- updated LiveUser dependency to 0.15.0
- fixed type handling in updateUser()
- update getErrors() with code from the LiveUser class
- typo fix in outputRightsConstants() (bug #3897)
- removed calls to make remove filter on delete of relationship tables (bug #3874) - 0.2.0 (beta, 2005-03-15)
Release notes
License: LGPL
- perm container now also has a default init() method that is called in the factory
- delete/update now dont require a filter in the id field
- delete/update now return the number of affected rows
- use LiveUser::cryptRC4() for rc4 handling
- added support to be able to query for single values, columns and rows next to
fetching multi dimensional arrays ('select' key in params array of get methods)
- improved error handling in several places to not trigger on empty results
- sequences are now named after the table they belong to
- now requiring MDB2-2.0.0beta3
- if the "force-seq" option is now set to false in the storage config
MDB2 will try to use autoincrement if supported by the RDBMS (you will need
to add autoincrement to the id fields in the applications, areas, groups,
rights, and perm_users tables yourself)
- example 1 now outputs all queries using an MDB2 debug handler
- Subgroups now work
- ImplyRights now work
- One can now remove groups recursively by passing recursive = true to
removeGroup in Perm Complex container (before it was hardcoded to true,
now defaults to false)
- Tests for SubGroups and ImplyRights up and running
- getGroup and getRight now work in Perm Complex Container
- added DB and MDB permission backends
- Complex container is now fully implemented.
- addAreaAdmin and removeAreaAdmin where added to the Complex container
- Admin.php getUser was removed and searchUser was renamed to getUsers and with
new params (BC break!)
- give each example a unique database name
- moved selectable tables into property so that they can be overwritten
- fixed autoinit handling in factoray (bug #3133)
- added missing PEAR error to error stack conversions
- return false if we previously ensured that the value is false anyways for clarity
- call setAdminAuthContainer() in updateUser() and removeUser() to ensure that
the proper auth container is affected
- updated the file headers as per the RFC
- getGroups() in the complex container was refactored and subgroup handling
was reworked (BC break!) - 0.1.0 (beta, 2004-12-20)
Release notes
License: LGPL
- refactored into a separate package from LiveUser
- severe BC breaks in the permission API in order to unify the API
- added ErrorStack
- fixed outputRightsConstants() method
- refactored storage layer to use an SQL query builder (DB and MDB support is
currently missing but will be added in the next minor update)
- sql query builder should output more portable SQL code
- sql query builder enables full aliasing of all field names
- sql query builder only joins the necessary tables so the admin API does not
force the usage of any table (especially the translation table)
- searchUser() now also fetches perm data
- the complex container is currently not fully implemented
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #2038 | Closed | Req | 2004-08-01 | Filter for auth_user_id in Admin/Perm, getUsers() method | |
| #2724 | Closed | Req | 2004-11-09 | new method checkGroup() | |
| #2964 | Closed | Req | 2004-12-14 | apps by define_name | |
| #2994 | Wont fix | Bug | 2004-12-20 | Bug in getGroup in MDB_Complex when you try get subGroup | |
| #3038 | Closed | Bug | 2004-12-27 | assignSubGroup | |
| #3039 | Closed | Bug | 2004-12-27 | exemple 1/Subgroups.php | |
| #3075 | Closed | Bug | 2005-01-01 | Error because of not defined variable | |
| #3133 | Closed | Bug | 2005-01-07 | factory use _option['autoInit'] but not set using param | |
| #3205 | Closed | Bug | 2005-01-14 | extra field in insert statment | |
| #3239 | Suspended | Req | 2005-01-19 | where operator in createWhere in LiveUser_Admin_Storage_SQL be changeable | |
| #3243 | Duplicate | Bug | 2005-01-19 | the function getRights in LiveUser_Admin_Perm_Simple can use getGroups | |
| #3245 | Closed | Bug | 2005-01-19 | $with in getGroups in LiveUser_Admin_Perm_Medium is used but not seted with par | |
| #3844 | Closed | Bug | 2005-03-16 | $this instead of $obj in factory method | |
| #3874 | Closed | Bug | 2005-03-18 | removeUserFromGroup() Removes all assignments | |
| #3897 | Closed | Bug | 2005-03-21 | Typo in outputRightsConstants() | |
| #3900 | Wont fix | Req | 2005-03-21 | Support limited queries with PEAR::DB | |
| #3975 | No Feedback | Bug | 2005-03-28 | LiveUser_Admin_Perm_Complex _updateImpliedStatus() bug | |
| #3976 | Closed | Bug | 2005-03-28 | LiveUser_Admin_Perm_Complex _getInheritedRights() | |
| #4109 | Closed | Bug | 2005-04-09 | Typo in Admin/Auth/DB.php | |
| #4120 | Bogus | Bug | 2005-04-11 | Error in query for getUsers('auth') Function | |
| #4150 | Closed | Bug | 2005-04-14 | Error in Admin::getGroups | |
| #4173 | Closed | Bug | 2005-04-17 | Typo in LiveUser_Admin_Perm_Storage_MDB class | |
| #4176 | Wont fix | Bug | 2005-04-18 | getRights() bug | |
| #4348 | Bogus | Bug | 2005-05-14 | All addSomething methods return 1 instead of the new ID when used with MDB2 | |
| #4357 | Closed | Bug | 2005-05-16 | perm->getUsers() example returns all users | |
| #4577 | Closed | Bug | 2005-06-12 | Passwords are not being encrypted when adding users | |
| #4592 | Bogus | Bug | 2005-06-14 | Error in example 1 | |
| #4595 | Closed | Bug | 2005-06-15 | Wrong order of operations in user removal | |
| #4618 | Closed | Bug | 2005-06-17 | Cannot remove areas and groups | |
| #4619 | Bogus | Req | 2005-06-17 | method that check if an permId is an areaAdmin | |
| #4630 | Closed | Bug | 2005-06-19 | Error in Admin example 1 | |
| #4631 | Closed | Bug | 2005-06-19 | Hierarchy mode does not work when id's of groups with subgroups are not passed | |
| #4632 | Bogus | Bug | 2005-06-19 | allowDuplicateHandles does not restrain admin->addUser() | |
| #4633 | Closed | Bug | 2005-06-19 | Hierarchy mode on subgroups not recursive | |
| #4638 | Closed | Bug | 2005-06-20 | createWhere dont work correctly with null value | |
| #4860 | Closed | Bug | 2005-07-19 | Subgroups - protection against circular relations | |
| #5054 | Closed | Bug | 2005-08-10 | Mistake in inline documentation | |
| #5059 | Closed | Bug | 2005-08-10 | When using the alias array the getUsers() method seems to ignore defined aliase | |
| #5310 | Closed | Bug | 2005-09-06 | order by on getUsers() doesn't work properly | |
| #5453 | Closed | Bug | 2005-09-19 | return of getRight() method | |
| #5480 | Closed | Req | 2005-09-21 | Related to debug and logging errors | |
| #5690 | Closed | Bug | 2005-10-14 | unnessecary exception thrown | |
| #5706 | Closed | Bug | 2005-10-17 | wrong return type in /LiveUser/Admin/Storage/SQL.php | |
| #6092 | Closed | Bug | 2005-11-27 | Bug with MDB2 storage and the datatype driver | |
| #6592 | Closed | Bug | 2006-01-26 | unimplyRight bug | |
| #7025 | Closed | Req | 0.3.7 | 2006-03-05 | BC breakage request - wrong defaults location |
| #7037 | Closed | Bug | 0.3.7 | 2006-03-06 | Perm outputRightsConstants documentation bug (type php) |
| #7041 | Analyzed | Req | 0.3.7 | 2006-03-06 | getRights() on an unassigned group returns nothing |
| #7050 | Closed | Bug | 0.16.10 | 2006-03-07 | unimplyRight: 2nd parameter does not work |
| #7051 | Bogus | Bug | 0.16.10 | 2006-03-07 | unimplyRight: no error msg if right_id does not exist in liveuser_rights |
| #7178 | Closed | Bug | 2006-03-22 | getUsers('auth',$filters) does not work properly | |
| #7213 | Closed | Bug | 0.3.7 | 2006-03-27 | PDO->fetchAll() Params in queryAll() |
| #7236 | Closed | Bug | 0.3.7 | 2006-03-29 | Forgot to change _getinheritedRights() |
| #7241 | Closed | Bug | CVS | 2006-03-29 | Error on fetching rights for a specific user that only has inherited rights |
| #7332 | Duplicate | Bug | 0.3.7 | 2006-04-06 | There is a typo in a variable name |
| #7779 | Closed | Req | CVS | 2006-06-01 | check is_array() in setSelectDefaultParams() |
| #7865 | Suspended | Req | 0.16.11 | 2006-06-11 | setProperty($property, $value); |
| #7955 | No Feedback | Bug | 0.3.8 | 2006-06-21 | getRights using hierarchy and '*','has_implied' as fields returns no implied |
| #7975 | Closed | Bug | CVS | 2006-06-23 | update of auth_user_id not possible in liveuser_perm_users table |
| #8198 | Bogus | Bug | 0.3.8 | 2006-07-13 | fail : inserting new user |
| #8350 | Closed | Bug | 0.3.8 | 2006-08-03 | LiveUser_Admin::addUser() and auto_increment |
| #8424 | Closed | Bug | 2006-08-13 | incorrect handling of single column joins | |
| #9706 | Open | Bug | 2006-12-28 | PDO Storage Module Incomplete | |
| #11051 | Closed | Bug | 0.3.9 | 2007-05-15 | Seems class variable is not declared |
| #11432 | Open | Bug | 0.3.9 | 2007-06-25 | Adding User on Multiple containers |
| #13233 | Closed | Bug | 0.3.9 | 2008-02-27 | Example1 error when importing data in DB |
| #15433 | Open | Bug | 0.3.9 | 2008-12-29 | With complex Perm container, removeUser doesn't clean up area_admin_areas |
| #15434 | Open | Bug | 0.3.9 | 2008-12-29 | With complex perm container, unimplyRight removes more records then it should. |