From: Jackson M. <ja...@ph...> - 2004-12-10 04:26:03
|
On Thursday 09 December 2004 13:19, Marcus Whitney wrote: > Jackson Miller wrote: > > > > Also, by putting the CEP_User object in the session, it persists > > across requests, reduces the overhead of object creation (object only > > created once per session), and gives global access. > > agreed. Can we get some requirements of the auth package/CEP_User > object down before we lockdown the API? Even if the above meets what > the requirements end up being? > Lock down the API? We ain'tbeta yet ;) Here is what I think we need to be able to do: - login - logout - verify a user is authenticated - check is a user is a member of a group - check if a member has a particular level of permission for a cep_object - get all groups a uses is a member of - get all permissions - be able to refresh permissions on every request via a global config option (mostly for debugging) - get a user's properties (id, email, username, password,etc) - refresh the permission on demand (after adding a right or a group, etc) - a user should maintain their highest level of permission on a cep_object (in cases where they have multiple perms for the same object via groups) Therefore this would be some (not all) of the methods. > > CEP_User::doLogin($username, $password); > > CEP_User::isAuthenticated(); // may be redundant > > CEP_User::getUserID(); > > CEP_User::checkGroup($group); > > CEP_User::checkPerm($cep_object_id,$level); > > CEP_User::doLogout(); -Jackson |