Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -33,6 +33,16 @@ class _Main extends \IPS\core\MemberACPProfile\MainTab
|
||||
$this->member = \IPS\nexus\Customer::load( $member->member_id );
|
||||
}
|
||||
|
||||
/**
|
||||
* Can view this Tab
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return (bool) \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'customers', 'customers_view' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get left-column blocks
|
||||
*
|
||||
@@ -52,14 +62,36 @@ class _Main extends \IPS\core\MemberACPProfile\MainTab
|
||||
*/
|
||||
public function mainColumnBlocks()
|
||||
{
|
||||
return array(
|
||||
'IPS\nexus\extensions\core\MemberACPProfileBlocks\Statistics',
|
||||
'IPS\nexus\extensions\core\MemberACPProfileBlocks\ParentAccounts',
|
||||
'IPS\nexus\extensions\core\MemberACPProfileBlocks\Notes',
|
||||
'IPS\nexus\extensions\core\MemberACPProfileBlocks\Purchases',
|
||||
'IPS\nexus\extensions\core\MemberACPProfileBlocks\Invoices',
|
||||
'IPS\nexus\extensions\core\MemberACPProfileBlocks\Support',
|
||||
);
|
||||
$return = array();
|
||||
|
||||
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'customers', 'customers_view_credit' ) )
|
||||
{
|
||||
$return[] = 'IPS\nexus\extensions\core\MemberACPProfileBlocks\Statistics';
|
||||
}
|
||||
|
||||
$return[] = 'IPS\nexus\extensions\core\MemberACPProfileBlocks\ParentAccounts';
|
||||
|
||||
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'customers', 'customer_notes_view' ) )
|
||||
{
|
||||
$return[] = 'IPS\nexus\extensions\core\MemberACPProfileBlocks\Notes';
|
||||
}
|
||||
|
||||
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'customers', 'purchases_view' ) )
|
||||
{
|
||||
$return[] = 'IPS\nexus\extensions\core\MemberACPProfileBlocks\Purchases';
|
||||
}
|
||||
|
||||
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'payments', 'invoices_manage' ) )
|
||||
{
|
||||
$return[] = 'IPS\nexus\extensions\core\MemberACPProfileBlocks\Invoices';
|
||||
}
|
||||
|
||||
if ( \IPS\Member::loggedIn()->hasAcpRestriction( 'nexus', 'support', 'requests_manage' ) )
|
||||
{
|
||||
$return[] = 'IPS\nexus\extensions\core\MemberACPProfileBlocks\Support';
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user