[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [9185] Added Sigurd's code for authentication in book
From: |
Alexander Stevenson |
Subject: |
[Fmsystem-commits] [9185] Added Sigurd's code for authentication in booking app. |
Date: |
Thu, 19 Apr 2012 13:11:30 +0000 |
Revision: 9185
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9185
Author: andvare
Date: 2012-04-19 13:11:28 +0000 (Thu, 19 Apr 2012)
Log Message:
-----------
Added Sigurd's code for authentication in booking app. Seems to work good!
Modified Paths:
--------------
trunk/booking/inc/class.account_helper.inc.php
Modified: trunk/booking/inc/class.account_helper.inc.php
===================================================================
--- trunk/booking/inc/class.account_helper.inc.php 2012-04-19 07:09:41 UTC
(rev 9184)
+++ trunk/booking/inc/class.account_helper.inc.php 2012-04-19 13:11:28 UTC
(rev 9185)
@@ -31,7 +31,7 @@
return $GLOBALS['phpgw']->accounts->membership();
}
- public static function current_account_member_of_admins()
+/* public static function current_account_member_of_admins()
{
if (!isset(self::$account_is_admin))
{
@@ -49,5 +49,21 @@
}
return self::$account_is_admin;
+ }*/
+
+ public static function current_account_member_of_admins()
+ {
+ if (!isset(self::$account_is_admin))
+ {
+ self::$account_is_admin = false;
+ if ( $GLOBALS['phpgw']->acl->check('run',
phpgwapi_acl::READ, 'admin')
+ || $GLOBALS['phpgw']->acl->check('admin',
phpgwapi_acl::ADD, 'booking'))
+ {
+ self::$account_is_admin = true;
+ }
+
+ }
+
+ return self::$account_is_admin;
}
- }
\ No newline at end of file
+ }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [9185] Added Sigurd's code for authentication in booking app.,
Alexander Stevenson <=