Implemented the capability to implemented a separate module for sharing objects between the silos:

+ possibility for a plugin to alter the definition of a class (add an attribute)
+ fixed a bug (low exposure) in the cache for MetaModel::GetObject()
+ possibility to have computed fields on links (list of fields in the form now based on the ZList 'list')

SVN:1.2[1853]
This commit is contained in:
Romain Quetiez
2012-02-17 09:35:06 +00:00
parent 3113205f88
commit 6d14da15cf
16 changed files with 420 additions and 151 deletions

View File

@@ -55,7 +55,7 @@ abstract class UserRightsAddOnAPI
abstract public function Init(); // loads data (possible optimizations)
// Used to build select queries showing only objects visible for the given user
abstract public function GetSelectFilter($sLogin, $sClass); // returns a filter object
abstract public function GetSelectFilter($sLogin, $sClass, $aSettings = array()); // returns a filter object
abstract public function IsActionAllowed($oUser, $sClass, $iActionCode, /*dbObjectSet*/ $oInstanceSet = null);
abstract public function IsStimulusAllowed($oUser, $sClass, $sStimulusCode, /*dbObjectSet*/ $oInstanceSet = null);
@@ -647,7 +647,7 @@ class UserRights
return true;
}
public static function GetSelectFilter($sClass)
public static function GetSelectFilter($sClass, $aSettings = array())
{
// When initializing, we need to let everything pass trough
if (!self::CheckLogin()) return true;
@@ -656,7 +656,7 @@ class UserRights
if (MetaModel::HasCategory($sClass, 'bizmodel'))
{
return self::$m_oAddOn->GetSelectFilter(self::$m_oUser, $sClass);
return self::$m_oAddOn->GetSelectFilter(self::$m_oUser, $sClass, $aSettings);
}
else
{