diff --git a/README.md b/README.md index f5c48248f662ca649c0c1509dace180685a0c5a4..b361cdd7e0b54d4da885a75d4383d59f9898fc19 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ vMap is able to manage business objects while using WMS producing server softwar - Follow the [install procedure](http://www.veremes.com/procedure-dinstallation-de-vmap) -## Install dev version (linux) +## Install dev version (Linux) To install the dev version of this project run the following steps: diff --git a/src/module_vmap/module/javascript/app/vmap/tools/print.js b/src/module_vmap/module/javascript/app/vmap/tools/print.js index f2d041ca2bb9172bf72884d8c7ef08051d3080aa..fd9550a4e7eef6b5fa9a5626cd32bdf50e029173 100644 --- a/src/module_vmap/module/javascript/app/vmap/tools/print.js +++ b/src/module_vmap/module/javascript/app/vmap/tools/print.js @@ -718,7 +718,6 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.print = function var sOrientation = response['data']['data'][0]['rt_orientation_id']; var mapImageSize = this_.printedMapSize_.realSize; - var mapImageSizeCompare = this_.printedCompareMapSize_.realSize; var overviewSize = this_.printedOverviewMapSize_.realSize; var oJsonDefOptions = { @@ -734,7 +733,7 @@ nsVmap.nsToolsManager.Print.prototype.printController.prototype.print = function if(goog.isDefAndNotNull(opt_options.extentCompare)){ oJsonDefOptions.extentCompare = opt_options.extentCompare; oJsonDefOptions.mapIdCompare = opt_options.mapIdCompare; - oJsonDefOptions.mapImageSizeCompare = mapImageSizeCompare; + oJsonDefOptions.mapImageSizeCompare = this_.printedCompareMapSize_.realSize; } var mapsJson = this_.getMapsJsonDef(oJsonDefOptions); diff --git a/src/vitis/vas/rest/conf/selected_properties.inc b/src/vitis/vas/rest/conf/selected_properties.inc index 309b082d049ad695cec58e0d9e4238b43e1f7c6d..a96cc600effcdf4b4754073173563e602a179a53 100644 --- a/src/vitis/vas/rest/conf/selected_properties.inc +++ b/src/vitis/vas/rest/conf/selected_properties.inc @@ -91,6 +91,8 @@ $aAdminFields = Array( $aUserFields = Array( 'websocket_alias', 'web_server_name', + 'vas_home', + 'database', 'language', 'cookie_lifetime', 'max_upload_file_size', diff --git a/src/vitis/vas/rest/ws/vitis/Privileges.class.inc b/src/vitis/vas/rest/ws/vitis/Privileges.class.inc index 2c408ff4a5c6ed01f56b55317f9848a22e8286ea..9d1856568ca179769bfd8af8559f33fb13a8fb51 100755 --- a/src/vitis/vas/rest/ws/vitis/Privileges.class.inc +++ b/src/vitis/vas/rest/ws/vitis/Privileges.class.inc @@ -9,7 +9,7 @@ * \brief This file contains the Modes php class * * This class defines Rest Api to Vitis Privileges - * + * */ require_once 'Vitis.class.inc'; require_once __DIR__ . '/../../class/vitis_lib/Connection.class.inc'; @@ -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']; } @@ -277,4 +284,4 @@ class Privileges extends Vitis { } -?> \ No newline at end of file +?> diff --git a/src/vitis/vas/rest/ws/vitis/PublicToken.class.inc b/src/vitis/vas/rest/ws/vitis/PublicToken.class.inc index 332c094f28624a0883f3dbe534931b92e9c19866..6db4b4ec277a758dfe01cd6236f62c23f3b1515f 100755 --- a/src/vitis/vas/rest/ws/vitis/PublicToken.class.inc +++ b/src/vitis/vas/rest/ws/vitis/PublicToken.class.inc @@ -41,21 +41,6 @@ class PublicToken extends Vitis { $this->aProperties = $properties; } - /** - * @SWG\Get(path="/publictoken", - * tags={"Token"}, - * summary="Get public token", - * description="Request to get a token", - * operationId="GET", - * produces={"application/xml", "application/json"}, - * @SWG\Response( - * response=200, - * description="Token Response", - * @SWG\Schema(ref="#/definitions/publictoken") - * ) - * ) - */ - /** * Method get to get a public token * @return user array @@ -102,4 +87,4 @@ class PublicToken extends Vitis { } -?> \ No newline at end of file +?> diff --git a/src/vitis/vas/rest/ws/vitis/Users.class.inc b/src/vitis/vas/rest/ws/vitis/Users.class.inc index fa87387f9567db5b22eafaa6146cdc4c19125462..56ec511d7a516ff8aba5dce2358a5c15e95c5444 100755 --- a/src/vitis/vas/rest/ws/vitis/Users.class.inc +++ b/src/vitis/vas/rest/ws/vitis/Users.class.inc @@ -249,8 +249,10 @@ class Users extends Vitis { } // verify if the user is vitis_admin else if (in_array("vitis_admin", $this->oConnection->aPrivileges)) { - // Changement de mot de passe ? require_once $this->sRessourcesFile; + if (empty($this->aValues["timezone_id"])) { + $this->aValues["timezone_id"] = "Europe/Paris"; + } $this->aValues["login"] = mb_strtolower($this->aValues["login"], 'UTF-8'); $this->aValues["login"] = str_replace(array('à', 'â', 'ä', 'á', 'ã', 'å', 'î', 'ï', 'ì', 'í', 'ô', 'ö', 'ò', 'ó', 'õ', 'ø', 'ù', 'û', 'ü', 'ú', 'é', 'è', 'ê', 'ë', 'ç', 'ÿ', 'ñ'), array('a', 'a', 'a', 'a', 'a', 'a', 'i', 'i', 'i', 'i', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'e', 'e', 'e', 'e', 'c', 'y', 'n',), $this->aValues["login"]); $aParams['sSchemaFramework'] = array('value' => $this->aProperties['schema_framework'], 'type' => 'schema_name'); @@ -676,7 +678,7 @@ class Users extends Vitis { if ($this->oConnection->oError == null && in_array("vitis_admin", $this->oConnection->aPrivileges)) { $aReturn = $this->genericDelete($this->aProperties['schema_framework'], 'v_user', 'user_id'); } else { - $oError = new Error(1, "Invalid token"); + $oError = new VitisError(1, "Invalid token"); $aXmlRacineAttribute['status'] = 0; $aReturn['sMessage'] = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); } diff --git a/src/vitis/vas/rest/ws/vitis/WebServices.class.inc b/src/vitis/vas/rest/ws/vitis/WebServices.class.inc index 09331cbb117a1ccf3f99b1e44f898588a593c1c0..4788845482fa1809c339bf6d9e6c63bcb40483f7 100755 --- a/src/vitis/vas/rest/ws/vitis/WebServices.class.inc +++ b/src/vitis/vas/rest/ws/vitis/WebServices.class.inc @@ -10,7 +10,7 @@ * \brief This file contains the WebServices php class * * This class defines Rest Api to Vitis WebServices - * + * */ require_once 'Vitis.class.inc'; require_once __DIR__ . '/../../class/vitis_lib/Connection.class.inc'; @@ -73,7 +73,7 @@ class WebServices extends Vitis { * ) */ /** - * @SWG\Get(path="/webservices/{web_service}", + * @SWG\Get(path="/webservices/{web_service}", * tags={"WebServices"}, * summary="Get WebService", * description="Request to get WebService by id", @@ -108,7 +108,7 @@ class WebServices extends Vitis { * ) */ /** - * @SWG\Get(path="/webservices/{web_service}/ressources", + * @SWG\Get(path="/webservices/{web_service}/ressources", * tags={"WebServices"}, * summary="Get ressources list", * description="Request to get ressources list", @@ -143,7 +143,7 @@ class WebServices extends Vitis { * ) */ /** - * @SWG\Get(path="/webservices/{web_service}/ressources/{ressource}", + * @SWG\Get(path="/webservices/{web_service}/ressources/{ressource}", * tags={"WebServices"}, * summary="Get ressources infos", * description="Request to get ressources infos", @@ -190,6 +190,14 @@ class WebServices extends Vitis { * @return Columns */ 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 rights to list webservices"); + $aXmlRacineAttribute['status'] = 0; + $sMessage = $oError->asDocument('', 'vitis', $this->aValues['sEncoding'], True, $aXmlRacineAttribute, $this->aValues['sSourceEncoding'], $this->aValues['output']); + return $sMessage; + } + if ($this->oConnection->oError == null) { require("../doc/vendor/autoload.php"); @@ -449,4 +457,4 @@ class RessourceList extends WebServices { } -?> \ No newline at end of file +?>