Re: [svn-commits] r8415 - r3/trunk/binarycloud/auth

alex black <[email protected]> Sun, 20 Mar 2005 12:42:14 -0800
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
this is insane - ignoreDB should be removed.

if you attempt to authenticate a role, you need a database, we should 
throw an exception of none is defined. simple as that.

_a


On Mar 19, 2005, at 2:12 PM, [email protected] wrote:

> Author: manuel
> Date: 2005-03-19 22:12:06 +0000 (Sat, 19 Mar 2005)
> New Revision: 8415
>
> Modified:
>    r3/trunk/binarycloud/auth/User.php
> Log:
> #139
>
> Modified: r3/trunk/binarycloud/auth/User.php
> ===================================================================
> --- r3/trunk/binarycloud/auth/User.php	2005-03-19 19:08:45 UTC (rev 
> 8414)
> +++ r3/trunk/binarycloud/auth/User.php	2005-03-19 22:12:06 UTC (rev 
> 8415)
> @@ -122,6 +122,14 @@
>       * @access  public
>       */
>      function authenticate($auth_data, $authenticator = null) {
> +        $conf =& Conf::getInstance();
> +        $settings = $conf->get('/auth');
> +
> +        // Warn developer in logs about authentication if ignore_db 
> is set for
> +        // Perm's configuration
> +        if ($settings['perm']['ignore_db'])
> +            Log::error(BC_LOG_WARNING, 'Authenticating though perm\'s 
> ignore_db setting is activated. It does not make much sense to have 
> authentication without a database in most cases and in our opinion. 
> Binarycloud will continue to work, but you might get undefined results 
> when using Perm.');
> +
>          $auth =& Auth::getInstance();
>          $result = null;
>
> @@ -159,6 +167,7 @@
>
>                  if ($res === null) // user not found, add it
>                      $res = $perm->addUser($userdata);
> +
>                  $this->id = $res['id'];
>              } if (catch('Exception', $e)) {
>                  throw($e);
>
> _______________________________________________
> svn-commits mailing list
> svn-commits-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
> http://lists.binarycloud.com/mailman/listinfo/svn-commits
>
>

-- 
alex black, founder
the turing studio, inc.

510.666.0074
[email protected]
http://www.turingstudio.com

2600 10th street, suite 635
berkeley, ca 94710


_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev