Finalized the module "user rights by profile". It is fully integrated with the application setup (inc. sample data). and it it now ready for developing the user management GUI

SVN:trunk[93]
This commit is contained in:
Romain Quetiez
2009-08-20 13:09:41 +00:00
parent ea59fa945a
commit daa9657e08
18 changed files with 2697 additions and 143 deletions

View File

@@ -194,8 +194,13 @@ class CMDBChangeOpSetAttribute extends CMDBChangeOp
public function GetDescription()
{
$sResult = '';
$oEmptySet = new DBObjectSet($this->Get('objclass'));
if (UserRights::IsActionAllowedOnAttribute($this->Get('objclass'), $this->Get('attcode'), UR_ACTION_READ, $oEmptySet) == UR_ALLOWED_YES)
$oTargetObjectClass = $this->Get('objclass');
$oTargetObjectKey = $this->Get('objkey');
$oTargetSearch = new DBObjectSearch($oTargetObjectClass);
$oTargetSearch->AddCondition('id', $oTargetObjectKey);
$oMonoObjectSet = new DBObjectSet($oTargetSearch);
if (UserRights::IsActionAllowedOnAttribute($this->Get('objclass'), $this->Get('attcode'), UR_ACTION_READ, $oMonoObjectSet) == UR_ALLOWED_YES)
{
$oAttDef = MetaModel::GetAttributeDef($this->Get('objclass'), $this->Get('attcode'));
$sAttName = $oAttDef->GetLabel();