Finalization of the user management by profile (UI to manage the accounts), and some unrelated changes:

- Using class labels in the UI
- Data model: you may specify a set of allowed values from a query (see caller_id in bizIncident class), still not 100% used in the UI but does not generate any error
- Data model: you may specify a password field (AttributePassword replacing AttributeString)
- Setup: calling UserRight::Setup() right after calling UserRight::CreateAdministrator()
- Setup: administrator account created with "my organization" and a dedicated contact
- Menus: optimized the load of std menus (queries written in OQL to get the benefit of the query cache)
- Menus: admin tools, seen only by people having the "admin" profile
- Object edition: fixed bug with the display of N-N links in the form

SVN:code[110]
This commit is contained in:
Romain Quetiez
2009-09-04 15:22:40 +00:00
parent a096d46a59
commit 6c286bf952
36 changed files with 3112 additions and 2524 deletions

View File

@@ -16,7 +16,6 @@
/**
* Sibusql - value set start
* @package iTopORM
* @info zis is private
*/
define('VS_START', '{');
/**
@@ -465,7 +464,7 @@ class DBObjectSearch
public function RenderCondition()
{
return $this->m_oSearchCondition->Render($this->m_aParams);
return $this->m_oSearchCondition->Render($this->m_aParams, true);
}
public function serialize()
@@ -507,7 +506,15 @@ class DBObjectSearch
$sRelCode = $aRelatedTo['relcode'];
$iMaxDepth = $aRelatedTo['maxdepth'];
$sValue .= "T:".$oFilter->serialize().":$sRelCode:$iMaxDepth";
$sValue .= "T:".$oFilter->serialize().":$sRelCode:$iMaxDepth\n";
}
if (count($this->m_aParams) > 0)
{
foreach($this->m_aParams as $sName => $sArgValue)
{
// G stands for arGument
$sValue .= "G:$sName:$sArgValue\n";
}
}
return base64_encode($sValue);
}
@@ -554,6 +561,11 @@ class DBObjectSearch
$sRelCode = $aCondition[2];
$iMaxDepth = $aCondition[3];
$oFilter->AddCondition_RelatedTo($oSubFilter, $sRelCode, $iMaxDepth);
break;
case "G":
$oFilter->m_aParams[$aCondition[1]] = $aCondition[2];
break;
default:
throw new CoreException("invalid filter definition (cannot unserialize the data, clear text = '$sClearText')");
}
@@ -600,6 +612,22 @@ class DBObjectSearch
public function ToOQL(&$aParams = null)
{
$bRetrofitParams = (!is_null($aParams));
if (is_null($aParams))
{
if (count($this->m_aParams) > 0)
{
$aParams = $this->m_aParams;
}
$bRetrofitParams = false;
}
else
{
if (count($this->m_aParams) > 0)
{
$aParams = array_merge($aParams, $this->m_aParams);
}
$bRetrofitParams = true;
}
$sRes = "SELECT ".$this->GetClass().' AS '.$this->GetClassAlias();
$sRes .= $this->ToOQL_Joins();