Skip to content
Snippets Groups Projects
Commit aa218bdc authored by Armand Bahi's avatar Armand Bahi
Browse files

Resolve "[API] Erreurs sur vitis/privileges sans droits d'admin"

parent cf82543a
No related branches found
No related tags found
No related merge requests found
......@@ -121,6 +121,13 @@ class Privileges extends Vitis {
* @return Privileges
*/
function GET() {
// Privilège "vitis_admin" requis.
if (!in_array('vitis_admin', $this->oConnection->aPrivileges)) {
$oError = new VitisError(1, "Rights problem : you don't have right list privileges");
$aXmlRacineAttribute['status'] = 0;
$sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']);
return $sMessage;
}
$aReturn = $this->genericGet($this->aProperties['schema_framework'], "privileges", "rolname");
return $aReturn['sMessage'];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment