fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [11043] mobilefrontend::auth


From: Sigurd Nes
Subject: [Fmsystem-commits] [11043] mobilefrontend::auth
Date: Tue, 09 Apr 2013 14:35:14 +0000

Revision: 11043
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11043
Author:   sigurdne
Date:     2013-04-09 14:35:14 +0000 (Tue, 09 Apr 2013)
Log Message:
-----------
mobilefrontend::auth

Modified Paths:
--------------
    trunk/mobilefrontend/setup/setup.inc.php
    trunk/phpgwapi/inc/class.login.inc.php

Added Paths:
-----------
    trunk/mobilefrontend/inc/class.hook_helper.inc.php

Added: trunk/mobilefrontend/inc/class.hook_helper.inc.php
===================================================================
--- trunk/mobilefrontend/inc/class.hook_helper.inc.php                          
(rev 0)
+++ trunk/mobilefrontend/inc/class.hook_helper.inc.php  2013-04-09 14:35:14 UTC 
(rev 11043)
@@ -0,0 +1,45 @@
+<?php
+       /**
+        * Mobilefrontend - Hook helper
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2013 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @package controller
+        * @version $Id: class.hook_helper.inc.php 10919 2013-02-18 14:47:02Z 
sigurdne $
+        */
+
+       /*
+          This program is free software: you can redistribute it and/or modify
+          it under the terms of the GNU General Public License as published by
+          the Free Software Foundation, either version 2 of the License, or
+          (at your option) any later version.
+
+          This program is distributed in the hope that it will be useful,
+          but WITHOUT ANY WARRANTY; without even the implied warranty of
+          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+          GNU General Public License for more details.
+
+          You should have received a copy of the GNU General Public License
+          along with this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+
+       /**
+        * Hook helper
+        *
+        * @package controller
+        */
+       class mobilefrontend_hook_helper
+       {
+               /**
+                * set auth_type for custom login - called from login
+                *
+                * @return void
+                */
+               public function set_auth_type()
+               {
+                       //get from local config
+                       $GLOBALS['phpgw_info']['server']['auth_type'] = 'sql';
+               }
+       }

Modified: trunk/mobilefrontend/setup/setup.inc.php
===================================================================
--- trunk/mobilefrontend/setup/setup.inc.php    2013-04-09 13:28:06 UTC (rev 
11042)
+++ trunk/mobilefrontend/setup/setup.inc.php    2013-04-09 14:35:14 UTC (rev 
11043)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['mobilefrontend']['name']           = 'mobilefrontend';
-       $setup_info['mobilefrontend']['version']        = '0.1.1';
+       $setup_info['mobilefrontend']['version']        = '0.1.2';
        $setup_info['mobilefrontend']['app_order']      = 80;
        $setup_info['mobilefrontend']['enable']         = 1;
        $setup_info['mobilefrontend']['app_group']      = 'office';
@@ -36,6 +36,7 @@
        <b>Mobilefrontend</b> for:
        <ol>
                <li>Conntroller</li>
+               <li>Property::tickets</li>
        </ol>
 
        <b>Mobilefrontend</b> is organized as a set of submodules as extensions 
to their backend-parents.
@@ -51,6 +52,7 @@
        (
                'config',
                'home',
+               'set_auth_type' => 'mobilefrontend.hook_helper.set_auth_type'
        );
 
        /* Dependencies for this app to work */

Modified: trunk/phpgwapi/inc/class.login.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.login.inc.php      2013-04-09 13:28:06 UTC (rev 
11042)
+++ trunk/phpgwapi/inc/class.login.inc.php      2013-04-09 14:35:14 UTC (rev 
11043)
@@ -64,6 +64,11 @@
                                $partial_url = 
'phpgwapi/inc/sso/login_server.php';
                        }
 
+                       if($frontend)
+                       {
+                               
$GLOBALS['phpgw']->hooks->process('set_auth_type', array($frontend));
+                       }
+                       
                        /* Program starts here */
                        $uilogin = new phpgw_uilogin($tmpl, 
$GLOBALS['phpgw_info']['server']['auth_type'] == 'remoteuser' && 
!isset($GLOBALS['phpgw_remote_user']));
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]