Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1360 files changed
+228921 -179445

No files matched your search

@@ -3,18 +3,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* ACP Restrictions
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-01-22 16:10:36 -0500 (Tue, 22 Jan 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 10914 $
* @version $Revision: 11883 $
*
*/
@@ -110,6 +110,9 @@ class class_permissions
// Get restrictions
//-----------------------------------------
$primaryGroupIsRestricted = FALSE;
$memberIsRestricted = FALSE;
$groups[] = $this->memberData['member_group_id'];
if( $this->memberData['mgroup_others'] )
@@ -130,12 +133,39 @@ class class_permissions
{
$this->restrictions_row = unserialize($r['row_perm_cache']);
$this->restricted = true;
$memberIsRestricted = TRUE;
break;
}
elseif ( $r['row_id'] == $this->memberData['member_group_id'] )
{
$primaryGroupIsRestricted = TRUE;
}
$this->restrictions_row = array_merge( $this->restrictions_row, unserialize($r['row_perm_cache']) );
$this->restricted = true;
}
//-----------------------------------------
// The primary group may not be restricted
// but it may not be able to access ACP either
//-----------------------------------------
$cache = ipsRegistry::cache()->getCache('group_cache');
if( ! $cache[$this->memberData['member_group_id']]['g_access_cp'] )
{
$primaryGroupIsRestricted = TRUE;
}
//-----------------------------------------
// If the primary group is unrestricted
// then we don't have any restrictions
//-----------------------------------------
if ( !$primaryGroupIsRestricted and !$memberIsRestricted )
{
$this->restricted = false;
}
}
/* Add in permissions for change my details, if we have restrictions, but not acess to that module */
@@ -248,6 +278,11 @@ class class_permissions
$auto_access = array( 'ajax', 'api', 'search', 'palette', 'login' );
if ( IN_ACP )
{
$auto_access[] = 'attach';
}
if ( in_array( $module, $auto_access ) )
{
return TRUE;
@@ -439,7 +474,7 @@ class class_permissions
{
$tmp = $this->return;
$this->return = false;
$this->checkPermission( $key, $app, $module );
$this->return = $tmp;
@@ -515,7 +550,7 @@ class class_permissions
//-----------------------------------------
// Returning.. or...
//-----------------------------------------
if ( $this->return )
{
return $return;