-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.json
1 lines (1 loc) · 61.1 KB
/
db.json
1
{"meta":{"version":1,"warehouse":"2.2.0"},"models":{"Asset":[{"_id":"source/images/success.jpg","path":"images/success.jpg","modified":1,"renderable":0},{"_id":"source/images/create_api_access.png","path":"images/create_api_access.png","modified":1,"renderable":0},{"_id":"themes/beautiful-hexo/source/logoCenter128.png","path":"logoCenter128.png","modified":1,"renderable":1},{"_id":"source/images/devices.png","path":"images/devices.png","modified":1,"renderable":0},{"_id":"themes/beautiful-hexo/source/css/blueprint-dark.png","path":"css/blueprint-dark.png","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/bootstrap-theme.css","path":"css/bootstrap-theme.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/bootstrap-theme.css.map","path":"css/bootstrap-theme.css.map","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/bootstrap-theme.min.css","path":"css/bootstrap-theme.min.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/highlight.css","path":"css/highlight.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/main-minimal.css","path":"css/main-minimal.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/main.css","path":"css/main.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/normalize.css","path":"css/normalize.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/normalize.min.css","path":"css/normalize.min.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/pygment_highlights.css","path":"css/pygment_highlights.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/js/highlight.min.js","path":"js/highlight.min.js","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/favicon.ico","path":"favicon.ico","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/js/bootstrap.min.js","path":"js/bootstrap.min.js","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/js/main.js","path":"js/main.js","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/bootstrap.min.css","path":"css/bootstrap.min.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/js/bootstrap.js","path":"js/bootstrap.js","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/js/jquery-1.11.2.min.js","path":"js/jquery-1.11.2.min.js","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/bootstrap.css","path":"css/bootstrap.css","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/bigimgs/02.jpg","path":"bigimgs/02.jpg","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/bigimgs/01.jpg","path":"bigimgs/01.jpg","modified":1,"renderable":1},{"_id":"themes/beautiful-hexo/source/css/bootstrap.css.map","path":"css/bootstrap.css.map","modified":1,"renderable":1}],"Cache":[{"_id":"themes/beautiful-hexo/.gitignore","hash":"4b40e2bf9a87584f198091434ed6f7ebbb829497","modified":1475047383000},{"_id":"themes/beautiful-hexo/LICENSE","hash":"99f2c87ae44734a9285212301c19293d2495bf79","modified":1475047383000},{"_id":"themes/beautiful-hexo/README.md","hash":"e3837c2ac6bfce5f03f91a28f9413e712c2b8ff9","modified":1475047383000},{"_id":"themes/beautiful-hexo/package.json","hash":"d84cf6dc4ebd800a768501843180341e87a84ae3","modified":1475047383000},{"_id":"themes/beautiful-hexo/_config.yml","hash":"c70b447d4b4360db7d6095831e4104dec1f176e2","modified":1490596330008},{"_id":"source/_posts/site.md","hash":"312a9a36c1b48c4a9d7a429be6240446ab7a658c","modified":1592375729430},{"_id":"source/about/index.md","hash":"104375b489049a44d4fc96a6bf5a78512bdef084","modified":1488633145868},{"_id":"source/images/success.jpg","hash":"e7b3a2d9100655da24bdaac0168e15ca360e4145","modified":1488635190649},{"_id":"source/images/create_api_access.png","hash":"b8617fe10a7f2ab12e16f2dc43577b6a16975244","modified":1566046963727},{"_id":"themes/beautiful-hexo/languages/en.yml","hash":"edca6efa5afd7ca478391bd24be970d2c04ddfbd","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/archive.jade","hash":"b599d808e8f400244bdf84452551ea8ea5a4c70b","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/index.jade","hash":"ee72daeca027ced57810fefe9b73666bd4507465","modified":1488631648065},{"_id":"themes/beautiful-hexo/layout/post.jade","hash":"afba374e8ba51e15a8d879cbe77994357fbc972a","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/page.jade","hash":"8ccd83e78150213c21d5941846cdef757f37c581","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/logoCenter128.png","hash":"4980c425563b9b23cf1b3eb5cb934763ccdf1936","modified":1488622666430},{"_id":"source/images/devices.png","hash":"2f5534f35e879d4e730081fe6bb2cde2840e7735","modified":1488706383776},{"_id":"themes/beautiful-hexo/layout/partial/base.jade","hash":"396af6da8c6b16f7982a16b128b81b8817b59624","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/partial/comment.jade","hash":"c1978d742705232d9e2ef1e3d05bb4ab451ec3da","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/partial/footer-scripts.jade","hash":"4106ddcd70030caf9d83ca0cb305266409a48cd7","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/partial/footer.jade","hash":"a40584c6d4fd7ec15bb034bce8edf10b22cfbcb7","modified":1488633236043},{"_id":"themes/beautiful-hexo/layout/partial/index-header.jade","hash":"b4db74194f0500a5786b3e385c39965562ce0806","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/partial/google_analytics.jade","hash":"4972fd998aa0ac476c4a4a497407b80fe3dc1af8","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/partial/post-meta.jade","hash":"bb0acc88e7527e3d95de2f2b6029957b96a0e7cc","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/blueprint-dark.png","hash":"725b992538a19f5ded0329c8a778dcd74bca7522","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/partial/head.jade","hash":"ec603125ea1f9c637ba7af03d4d89c70ebdf3ba0","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/bootstrap-theme.css","hash":"815675548997eadc98fc4beb1b698b35c2d5c5cb","modified":1475047383000},{"_id":"themes/beautiful-hexo/layout/partial/nav.jade","hash":"f2dc43f403b2f8309ae6cf507689a57d3760a65d","modified":1488704717596},{"_id":"themes/beautiful-hexo/source/css/bootstrap-theme.css.map","hash":"ccb7ff3435bb5cff1fe9643fc0ac8cdde2dcd177","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/bootstrap-theme.min.css","hash":"36f0fd5cb451590d055b38f6afad8c69f74bfc9a","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/highlight.css","hash":"3c0cd05d7c1e3d00203e72a3f6ac99f521e2455c","modified":1488629899192},{"_id":"themes/beautiful-hexo/source/css/main-minimal.css","hash":"e2b7f8ccfdb858c3969c756aa94a761970349d68","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/main.css","hash":"02c4189d2e00fe491ec63c3fa82fe18a47302ca0","modified":1488645215868},{"_id":"themes/beautiful-hexo/source/css/normalize.css","hash":"6924ce12bf79586ce0c095157aed4438e97bbe89","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/normalize.min.css","hash":"a8d03b757f75752e15aa9e43ed8c071cb50e848d","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/pygment_highlights.css","hash":"f4e5374eae88aa573b9bef83ae131a0f05cc94e7","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/js/highlight.min.js","hash":"49cd3a843a1f8a46d00d6e936bda839e2091951c","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/favicon.ico","hash":"89e8ff8e7f78d703ccc34ae9c82f9fdf538c23f1","modified":1488623040571},{"_id":"themes/beautiful-hexo/source/js/bootstrap.min.js","hash":"b3f2ef9f985e7906c9360756b73cd64bf7733647","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/js/main.js","hash":"9e9bf3864ac1db24c5b20f46d92557b815d36d93","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/bootstrap.min.css","hash":"973e37a8502921d56bc02bb55321f45b072b6f71","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/js/bootstrap.js","hash":"f8752e9ae24daec0a0baffd7819122f8c6fd9103","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/js/jquery-1.11.2.min.js","hash":"8130544c215fe5d1ec081d83461bf4a711e74882","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/css/bootstrap.css","hash":"41c54bf695145ae0b4d9020a1da308ceb05dcaf3","modified":1475047383000},{"_id":"themes/beautiful-hexo/source/bigimgs/02.jpg","hash":"169c8ee718a1d141134a95d67121e03f03259bd7","modified":1488629058406},{"_id":"themes/beautiful-hexo/source/bigimgs/01.jpg","hash":"289c7784b90c8af6c805b0401b6b2ea7713fdb27","modified":1488624004907},{"_id":"themes/beautiful-hexo/source/css/bootstrap.css.map","hash":"5009e973465fbe2477b22e4dcd1041e6bb385c21","modified":1475047383000},{"_id":"public/atom.xml","hash":"aecf7553239b4e2e6385706bf2f17bed16d61b7d","modified":1592375773886},{"_id":"public/sitemap.xml","hash":"bc973b3cd9857c679d47034cc868ed3e6ed58670","modified":1592375773887},{"_id":"public/about/index.html","hash":"72e50aec56ccc03d467464ad255c7341181b9c8e","modified":1592375773890},{"_id":"public/archives/index.html","hash":"9e32b58d0ff3035a1e252f24ddc23b0c638c9f20","modified":1592375773890},{"_id":"public/2017/03/03/site/index.html","hash":"72da2ce0b872c2a3e9a02b90f7b888377121bb6d","modified":1592375773890},{"_id":"public/index.html","hash":"a643519423aed81c7fe8a3b96941dcca44a43ac9","modified":1592375773890},{"_id":"public/logoCenter128.png","hash":"4980c425563b9b23cf1b3eb5cb934763ccdf1936","modified":1592375773892},{"_id":"public/css/blueprint-dark.png","hash":"725b992538a19f5ded0329c8a778dcd74bca7522","modified":1592375773892},{"_id":"public/images/create_api_access.png","hash":"b8617fe10a7f2ab12e16f2dc43577b6a16975244","modified":1592375773892},{"_id":"public/images/success.jpg","hash":"e7b3a2d9100655da24bdaac0168e15ca360e4145","modified":1592375773894},{"_id":"public/css/bootstrap-theme.css.map","hash":"ccb7ff3435bb5cff1fe9643fc0ac8cdde2dcd177","modified":1592375773894},{"_id":"public/css/highlight.css","hash":"3c0cd05d7c1e3d00203e72a3f6ac99f521e2455c","modified":1592375773897},{"_id":"public/css/main-minimal.css","hash":"e2b7f8ccfdb858c3969c756aa94a761970349d68","modified":1592375773897},{"_id":"public/css/normalize.css","hash":"6924ce12bf79586ce0c095157aed4438e97bbe89","modified":1592375773897},{"_id":"public/css/pygment_highlights.css","hash":"f4e5374eae88aa573b9bef83ae131a0f05cc94e7","modified":1592375773897},{"_id":"public/css/normalize.min.css","hash":"a8d03b757f75752e15aa9e43ed8c071cb50e848d","modified":1592375773897},{"_id":"public/js/main.js","hash":"9e9bf3864ac1db24c5b20f46d92557b815d36d93","modified":1592375773897},{"_id":"public/images/devices.png","hash":"2f5534f35e879d4e730081fe6bb2cde2840e7735","modified":1592375773897},{"_id":"public/bigimgs/02.jpg","hash":"169c8ee718a1d141134a95d67121e03f03259bd7","modified":1592375773897},{"_id":"public/css/main.css","hash":"02c4189d2e00fe491ec63c3fa82fe18a47302ca0","modified":1592375773899},{"_id":"public/css/bootstrap-theme.css","hash":"815675548997eadc98fc4beb1b698b35c2d5c5cb","modified":1592375773900},{"_id":"public/css/bootstrap-theme.min.css","hash":"36f0fd5cb451590d055b38f6afad8c69f74bfc9a","modified":1592375773900},{"_id":"public/favicon.ico","hash":"89e8ff8e7f78d703ccc34ae9c82f9fdf538c23f1","modified":1592375773901},{"_id":"public/bigimgs/01.jpg","hash":"289c7784b90c8af6c805b0401b6b2ea7713fdb27","modified":1592375773901},{"_id":"public/css/bootstrap.css.map","hash":"5009e973465fbe2477b22e4dcd1041e6bb385c21","modified":1592375773901},{"_id":"public/js/bootstrap.min.js","hash":"b3f2ef9f985e7906c9360756b73cd64bf7733647","modified":1592375773903},{"_id":"public/js/highlight.min.js","hash":"49cd3a843a1f8a46d00d6e936bda839e2091951c","modified":1592375773903},{"_id":"public/js/bootstrap.js","hash":"f8752e9ae24daec0a0baffd7819122f8c6fd9103","modified":1592375773905},{"_id":"public/js/jquery-1.11.2.min.js","hash":"8130544c215fe5d1ec081d83461bf4a711e74882","modified":1592375773906},{"_id":"public/css/bootstrap.min.css","hash":"973e37a8502921d56bc02bb55321f45b072b6f71","modified":1592375773907},{"_id":"public/css/bootstrap.css","hash":"41c54bf695145ae0b4d9020a1da308ceb05dcaf3","modified":1592375773908}],"Category":[],"Data":[],"Page":[{"title":"About Gadael","_content":"\n\nGadael is a time managament software created to be used in small to large companies. It can be used to efficently manage leave requests with an approval workflow.\n\nVarious integrations are proposed to integrate well into your business current usages.\n\n* Integration with personal google calendar.\n* Export to sage or excel stylesheets.\n* Responsive design for usage on all mobile devices.\n* One click actions from your gmail account for department managers.\n\nGadael is distribued under the [MIT licence](https://fr.wikipedia.org/wiki/Licence_MIT), if you want to install it on your own server or contribute to the project, please go to the [github repository](https://github.com/gadael/gadael).\n\nThe application is built on a [MEAN stack](https://en.wikipedia.org/wiki/MEAN_%28software_bundle%29) and make use of theses open source softwares :\n[MongoDB](https://www.mongodb.com/),\n[Express.js](http://expressjs.com/),\n[Angular](https://angularjs.org/), and\n[Node.js](https://nodejs.org/).\n","source":"about/index.md","raw":"---\ntitle: About Gadael\n---\n\n\nGadael is a time managament software created to be used in small to large companies. It can be used to efficently manage leave requests with an approval workflow.\n\nVarious integrations are proposed to integrate well into your business current usages.\n\n* Integration with personal google calendar.\n* Export to sage or excel stylesheets.\n* Responsive design for usage on all mobile devices.\n* One click actions from your gmail account for department managers.\n\nGadael is distribued under the [MIT licence](https://fr.wikipedia.org/wiki/Licence_MIT), if you want to install it on your own server or contribute to the project, please go to the [github repository](https://github.com/gadael/gadael).\n\nThe application is built on a [MEAN stack](https://en.wikipedia.org/wiki/MEAN_%28software_bundle%29) and make use of theses open source softwares :\n[MongoDB](https://www.mongodb.com/),\n[Express.js](http://expressjs.com/),\n[Angular](https://angularjs.org/), and\n[Node.js](https://nodejs.org/).\n","date":"2017-03-04T13:12:25.868Z","updated":"2017-03-04T13:12:25.868Z","path":"about/index.html","comments":1,"layout":"page","_id":"ckbizf6hi00015l9rmi5f273z","content":"<p>Gadael is a time managament software created to be used in small to large companies. It can be used to efficently manage leave requests with an approval workflow.</p>\n<p>Various integrations are proposed to integrate well into your business current usages.</p>\n<ul>\n<li>Integration with personal google calendar.</li>\n<li>Export to sage or excel stylesheets.</li>\n<li>Responsive design for usage on all mobile devices.</li>\n<li>One click actions from your gmail account for department managers.</li>\n</ul>\n<p>Gadael is distribued under the <a href=\"https://fr.wikipedia.org/wiki/Licence_MIT\" target=\"_blank\" rel=\"external\">MIT licence</a>, if you want to install it on your own server or contribute to the project, please go to the <a href=\"https://github.com/gadael/gadael\" target=\"_blank\" rel=\"external\">github repository</a>.</p>\n<p>The application is built on a <a href=\"https://en.wikipedia.org/wiki/MEAN_%28software_bundle%29\" target=\"_blank\" rel=\"external\">MEAN stack</a> and make use of theses open source softwares :<br><a href=\"https://www.mongodb.com/\" target=\"_blank\" rel=\"external\">MongoDB</a>,<br><a href=\"http://expressjs.com/\" target=\"_blank\" rel=\"external\">Express.js</a>,<br><a href=\"https://angularjs.org/\" target=\"_blank\" rel=\"external\">Angular</a>, and<br><a href=\"https://nodejs.org/\" target=\"_blank\" rel=\"external\">Node.js</a>.</p>\n","excerpt":"","more":"<p>Gadael is a time managament software created to be used in small to large companies. It can be used to efficently manage leave requests with an approval workflow.</p>\n<p>Various integrations are proposed to integrate well into your business current usages.</p>\n<ul>\n<li>Integration with personal google calendar.</li>\n<li>Export to sage or excel stylesheets.</li>\n<li>Responsive design for usage on all mobile devices.</li>\n<li>One click actions from your gmail account for department managers.</li>\n</ul>\n<p>Gadael is distribued under the <a href=\"https://fr.wikipedia.org/wiki/Licence_MIT\">MIT licence</a>, if you want to install it on your own server or contribute to the project, please go to the <a href=\"https://github.com/gadael/gadael\">github repository</a>.</p>\n<p>The application is built on a <a href=\"https://en.wikipedia.org/wiki/MEAN_%28software_bundle%29\">MEAN stack</a> and make use of theses open source softwares :<br><a href=\"https://www.mongodb.com/\">MongoDB</a>,<br><a href=\"http://expressjs.com/\">Express.js</a>,<br><a href=\"https://angularjs.org/\">Angular</a>, and<br><a href=\"https://nodejs.org/\">Node.js</a>.</p>\n"}],"Post":[{"title":"Gadael.org","_content":"\n## Functionalities\n\nGadael is a powerful leave management application with rights attributions based on complex rules and periods planing. With Gadael you can:\n * Schedule multiples leave renewal periods in advance.\n * Automatically make adjustments of quantity based on the consumption on other rights.\n * Export your data for your payslip application.\n * Sync plannings with your google calendars.\n * Set up a policy for overtime recovery in the form of holiday entitlements.\n * Multi-level approval work-flow\n\n\n\n\n\n## Install\n\n### With git and NPM\n\nGadael can be installed from the git version, this is the best choice for taking advantage of the lastest features. For this to work, some dependencies need to be installed on the system first, you will have to install the dependencies using your system packages manager or manually.\n\n* [nodejs](https://nodejs.org/)\n* [MongoDB](https://www.mongodb.com/), the database server, version 3 is required.\n* [git](https://git-scm.com/), this is the version control system used for Gadael development\n* [npm](https://www.npmjs.com/), for nodejs dependencies\n* [bower](https://bower.io/), for front-end dependencies\n\nThen the install process can be resumed with this list of commands:\n\n```bash\ngit clone https://github.com/gadael/gadael\ncd gadael\nnpm install --production\nbower install\n```\n\nCreate the config file:\n\n```bash\ncp config.example.js config.js\n```\n\nYou will have to configure an SMTP host and a root url in this file for the emails notifications to work correctly.\n\nDatabase initialization:\n\n```bash\nnode install.js gadael \"Your company name\" FR\n```\nFirst argument is the database name, default is gadael.\nSecond argument is your company name, default is \"Gadael\".\nThird argument is the country code used to initialize the database, if not provided the leave rights list will be empty. You can check the list of [supported countries in the documentation](https://www.gadael.com/en/docs/version-master/008-the-countries.html)\n\n\nYou will have to start the server with this command:\n\n```bash\nnode app.js\n```\n\nopen http://localhost:3000 in your browser, you will be required to create an admin account on the first page.\n\n\n\nCongratulation! your setup is working!\n\n\n### Using a Docker container\n\nhttps://hub.docker.com/r/webinage/gadael\n\n\n### Use the SaaS version\n\nIf you have no server available and want to take advantage of automatic updates to the last version, you can use Gadael directly from [gadael.com](https://www.gadael.com/), it's free for team up to 5 users. If you choose to subscribe to a paid plan you will benefit from the email technical support for all your configuration problems.\n\n\n### Set up a reverse proxy\n\nApplication listen on localhost only by default, an https reverse proxy will be necessary to open access to users. This will add the ability to serve the application on the default port.\n\nThe examples given here are on a Debian system, a similar setup is possible with another distribution or package manager. We will use mydomain.com as an example URL, you must have a domain name already configured and linked to the web server by DNS configuration.\n\n\n#### Using the Apache web server\n\n\nSo first of all, we need to install [Apache2](https://httpd.apache.org/):\n\n```bash\napt update\napt install apache2\n```\n\nNext thing we'll have to do is proxy all request incoming on port 80 to the gadael local port. For this, we need to install/enable mod_proxy and mod_proxy_http modules on the Apache server:\n\n```bash\na2enmod proxy\na2enmod proxy_http\n```\nThen we'll configure a VirtualHost like this:\n\n```bash\nvi /etc/apache2/sites-available/gadael.conf\n```\n\nWith the content:\n\n```\n<VirtualHost *:80>\n ServerAdmin [email protected]\n ServerName mydomain.com\n\n ProxyRequests Off\n <Proxy *>\n Require all granted\n </Proxy>\n\n <Location /nodejsAppli>\n ProxyPass http://127.0.0.1:3000\n ProxyPassReverse http://1127.0.0.1:3000\n </Location>\n\n ErrorLog ${APACHE_LOG_DIR}/gadael-error.log\n CustomLog ${APACHE_LOG_DIR}/access.log combined\n\n</VirtualHost>\n```\n\nThe new virtual host need to be enabled before restarting apache:\n\n```\na2ensite mySite.conf\nservicectrl restart apache2\n```\n\nAfter this last step, you can access your application using only http://mydomain.com/. This configuration can be enhanced by adding ssl certificates for the HTTPS protocol.\n\n#### Using the nginx web server\n\nInstall [nginx](https://nginx.org/en/):\n\n```bash\napt update\napt install nginx\n```\nEdit the default site configuration:\n\n```bash\nvi /etc/nginx/sites-available/default\n```\n\nSetting this content will redirect request from port 80 the the port 3000. If a port different than 3000 was used in your gadael configuration, you must change the `proxy_pass` line.\n\n```\nserver {\n listen 80;\n server_name mydomain.com;\n\n location / {\n proxy_pass http://127.0.0.1:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host $host;\n proxy_cache_bypass $http_upgrade;\n }\n}\n```\n\nA restart of the server is required:\n\n```bash\nsystemctrl restart nginx\n```\n\n## Configure a custom login strategy\n\nLogin options are stored in the company document in database\n\nAdd a CAS authentication method with the command line mongo client :\n\n```bash\n$ mongo gadael\n> var company = db.companies.find()[0];\n> company.loginservices.cas = { \"ssoBaseURL\" : \"https://....\", \"enable\" : true }\n> db.companies.update({ \"_id\": company._id }, company);\n```\n\n## Working with the API\n\ngadael allows to use the API to exchange with the database in the same way as the web interface. To do this, you need to create a specific user with the administrator role.\n\n\n\nThe obtained API key allow to authenticate with oauth2.\n\nThis is the list of paths with API access enabled by default:\n\napi/admin/users\napi/admin/usersstat\napi/admin/accountrights\napi/admin/accountcollections\napi/admin/departments\napi/admin/calendars\napi/admin/calendarevents\napi/admin/personalevents\napi/admin/collaborators\napi/admin/unavailableevents\napi/admin/types\napi/admin/specialrights\napi/admin/rights\napi/admin/rightrenewals\napi/admin/accountbeneficiaries\napi/admin/beneficiaries\napi/admin/requests\napi/admin/waitingrequests\napi/admin/export\napi/admin/consumption\napi/admin/invitations\n\n### Use the API to get the users list\n\nstep 1, get an access token:\n```bash\n$curl -X POST -d \"grant_type=client_credentials&client_id=<your client ID>&client_secret=<your client secret>\" https://demo.gadael.com/login/oauth-token\n\n{\"access_token\":\"55d99b2af2a2b2a914120e6e4b6e13f6bdbf88ed\",\"token_type\":\"Bearer\",\"expires_in\":3599,\"scope\":[]}\n```\n\nstep 2, use access token to get the list of users:\n```bash\n$curl -H \"Authorization: Bearer 55d99b2af2a2b2a914120e6e4b6e13f6bdbf88ed\" https://demo.gadael.com/api/admin/users\n\n[...]\n```\n","source":"_posts/site.md","raw":"---\ntitle: Gadael.org\n---\n\n## Functionalities\n\nGadael is a powerful leave management application with rights attributions based on complex rules and periods planing. With Gadael you can:\n * Schedule multiples leave renewal periods in advance.\n * Automatically make adjustments of quantity based on the consumption on other rights.\n * Export your data for your payslip application.\n * Sync plannings with your google calendars.\n * Set up a policy for overtime recovery in the form of holiday entitlements.\n * Multi-level approval work-flow\n\n\n\n\n\n## Install\n\n### With git and NPM\n\nGadael can be installed from the git version, this is the best choice for taking advantage of the lastest features. For this to work, some dependencies need to be installed on the system first, you will have to install the dependencies using your system packages manager or manually.\n\n* [nodejs](https://nodejs.org/)\n* [MongoDB](https://www.mongodb.com/), the database server, version 3 is required.\n* [git](https://git-scm.com/), this is the version control system used for Gadael development\n* [npm](https://www.npmjs.com/), for nodejs dependencies\n* [bower](https://bower.io/), for front-end dependencies\n\nThen the install process can be resumed with this list of commands:\n\n```bash\ngit clone https://github.com/gadael/gadael\ncd gadael\nnpm install --production\nbower install\n```\n\nCreate the config file:\n\n```bash\ncp config.example.js config.js\n```\n\nYou will have to configure an SMTP host and a root url in this file for the emails notifications to work correctly.\n\nDatabase initialization:\n\n```bash\nnode install.js gadael \"Your company name\" FR\n```\nFirst argument is the database name, default is gadael.\nSecond argument is your company name, default is \"Gadael\".\nThird argument is the country code used to initialize the database, if not provided the leave rights list will be empty. You can check the list of [supported countries in the documentation](https://www.gadael.com/en/docs/version-master/008-the-countries.html)\n\n\nYou will have to start the server with this command:\n\n```bash\nnode app.js\n```\n\nopen http://localhost:3000 in your browser, you will be required to create an admin account on the first page.\n\n\n\nCongratulation! your setup is working!\n\n\n### Using a Docker container\n\nhttps://hub.docker.com/r/webinage/gadael\n\n\n### Use the SaaS version\n\nIf you have no server available and want to take advantage of automatic updates to the last version, you can use Gadael directly from [gadael.com](https://www.gadael.com/), it's free for team up to 5 users. If you choose to subscribe to a paid plan you will benefit from the email technical support for all your configuration problems.\n\n\n### Set up a reverse proxy\n\nApplication listen on localhost only by default, an https reverse proxy will be necessary to open access to users. This will add the ability to serve the application on the default port.\n\nThe examples given here are on a Debian system, a similar setup is possible with another distribution or package manager. We will use mydomain.com as an example URL, you must have a domain name already configured and linked to the web server by DNS configuration.\n\n\n#### Using the Apache web server\n\n\nSo first of all, we need to install [Apache2](https://httpd.apache.org/):\n\n```bash\napt update\napt install apache2\n```\n\nNext thing we'll have to do is proxy all request incoming on port 80 to the gadael local port. For this, we need to install/enable mod_proxy and mod_proxy_http modules on the Apache server:\n\n```bash\na2enmod proxy\na2enmod proxy_http\n```\nThen we'll configure a VirtualHost like this:\n\n```bash\nvi /etc/apache2/sites-available/gadael.conf\n```\n\nWith the content:\n\n```\n<VirtualHost *:80>\n ServerAdmin [email protected]\n ServerName mydomain.com\n\n ProxyRequests Off\n <Proxy *>\n Require all granted\n </Proxy>\n\n <Location /nodejsAppli>\n ProxyPass http://127.0.0.1:3000\n ProxyPassReverse http://1127.0.0.1:3000\n </Location>\n\n ErrorLog ${APACHE_LOG_DIR}/gadael-error.log\n CustomLog ${APACHE_LOG_DIR}/access.log combined\n\n</VirtualHost>\n```\n\nThe new virtual host need to be enabled before restarting apache:\n\n```\na2ensite mySite.conf\nservicectrl restart apache2\n```\n\nAfter this last step, you can access your application using only http://mydomain.com/. This configuration can be enhanced by adding ssl certificates for the HTTPS protocol.\n\n#### Using the nginx web server\n\nInstall [nginx](https://nginx.org/en/):\n\n```bash\napt update\napt install nginx\n```\nEdit the default site configuration:\n\n```bash\nvi /etc/nginx/sites-available/default\n```\n\nSetting this content will redirect request from port 80 the the port 3000. If a port different than 3000 was used in your gadael configuration, you must change the `proxy_pass` line.\n\n```\nserver {\n listen 80;\n server_name mydomain.com;\n\n location / {\n proxy_pass http://127.0.0.1:3000;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection 'upgrade';\n proxy_set_header Host $host;\n proxy_cache_bypass $http_upgrade;\n }\n}\n```\n\nA restart of the server is required:\n\n```bash\nsystemctrl restart nginx\n```\n\n## Configure a custom login strategy\n\nLogin options are stored in the company document in database\n\nAdd a CAS authentication method with the command line mongo client :\n\n```bash\n$ mongo gadael\n> var company = db.companies.find()[0];\n> company.loginservices.cas = { \"ssoBaseURL\" : \"https://....\", \"enable\" : true }\n> db.companies.update({ \"_id\": company._id }, company);\n```\n\n## Working with the API\n\ngadael allows to use the API to exchange with the database in the same way as the web interface. To do this, you need to create a specific user with the administrator role.\n\n\n\nThe obtained API key allow to authenticate with oauth2.\n\nThis is the list of paths with API access enabled by default:\n\napi/admin/users\napi/admin/usersstat\napi/admin/accountrights\napi/admin/accountcollections\napi/admin/departments\napi/admin/calendars\napi/admin/calendarevents\napi/admin/personalevents\napi/admin/collaborators\napi/admin/unavailableevents\napi/admin/types\napi/admin/specialrights\napi/admin/rights\napi/admin/rightrenewals\napi/admin/accountbeneficiaries\napi/admin/beneficiaries\napi/admin/requests\napi/admin/waitingrequests\napi/admin/export\napi/admin/consumption\napi/admin/invitations\n\n### Use the API to get the users list\n\nstep 1, get an access token:\n```bash\n$curl -X POST -d \"grant_type=client_credentials&client_id=<your client ID>&client_secret=<your client secret>\" https://demo.gadael.com/login/oauth-token\n\n{\"access_token\":\"55d99b2af2a2b2a914120e6e4b6e13f6bdbf88ed\",\"token_type\":\"Bearer\",\"expires_in\":3599,\"scope\":[]}\n```\n\nstep 2, use access token to get the list of users:\n```bash\n$curl -H \"Authorization: Bearer 55d99b2af2a2b2a914120e6e4b6e13f6bdbf88ed\" https://demo.gadael.com/api/admin/users\n\n[...]\n```\n","slug":"site","published":1,"date":"2017-03-03T20:24:04.867Z","updated":"2020-06-17T06:35:29.430Z","comments":1,"layout":"post","photos":[],"link":"","_id":"ckbizf6ge00005l9rso0tvooi","content":"<h2 id=\"Functionalities\"><a href=\"#Functionalities\" class=\"headerlink\" title=\"Functionalities\"></a>Functionalities</h2><p>Gadael is a powerful leave management application with rights attributions based on complex rules and periods planing. With Gadael you can:</p>\n<ul>\n<li>Schedule multiples leave renewal periods in advance.</li>\n<li>Automatically make adjustments of quantity based on the consumption on other rights.</li>\n<li>Export your data for your payslip application.</li>\n<li>Sync plannings with your google calendars.</li>\n<li>Set up a policy for overtime recovery in the form of holiday entitlements.</li>\n<li>Multi-level approval work-flow</li>\n</ul>\n<p><img src=\"images/devices.png\" alt=\"All devices compatible\"></p>\n<h2 id=\"Install\"><a href=\"#Install\" class=\"headerlink\" title=\"Install\"></a>Install</h2><h3 id=\"With-git-and-NPM\"><a href=\"#With-git-and-NPM\" class=\"headerlink\" title=\"With git and NPM\"></a>With git and NPM</h3><p>Gadael can be installed from the git version, this is the best choice for taking advantage of the lastest features. For this to work, some dependencies need to be installed on the system first, you will have to install the dependencies using your system packages manager or manually.</p>\n<ul>\n<li><a href=\"https://nodejs.org/\" target=\"_blank\" rel=\"external\">nodejs</a></li>\n<li><a href=\"https://www.mongodb.com/\" target=\"_blank\" rel=\"external\">MongoDB</a>, the database server, version 3 is required.</li>\n<li><a href=\"https://git-scm.com/\" target=\"_blank\" rel=\"external\">git</a>, this is the version control system used for Gadael development</li>\n<li><a href=\"https://www.npmjs.com/\" target=\"_blank\" rel=\"external\">npm</a>, for nodejs dependencies</li>\n<li><a href=\"https://bower.io/\" target=\"_blank\" rel=\"external\">bower</a>, for front-end dependencies</li>\n</ul>\n<p>Then the install process can be resumed with this list of commands:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div></pre></td><td class=\"code\"><pre><div class=\"line\">git <span class=\"built_in\">clone</span> https://github.com/gadael/gadael</div><div class=\"line\"><span class=\"built_in\">cd</span> gadael</div><div class=\"line\">npm install --production</div><div class=\"line\">bower install</div></pre></td></tr></table></figure>\n<p>Create the config file:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">cp config.example.js config.js</div></pre></td></tr></table></figure>\n<p>You will have to configure an SMTP host and a root url in this file for the emails notifications to work correctly.</p>\n<p>Database initialization:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">node install.js gadael <span class=\"string\">\"Your company name\"</span> FR</div></pre></td></tr></table></figure>\n<p>First argument is the database name, default is gadael.<br>Second argument is your company name, default is “Gadael”.<br>Third argument is the country code used to initialize the database, if not provided the leave rights list will be empty. You can check the list of <a href=\"https://www.gadael.com/en/docs/version-master/008-the-countries.html\" target=\"_blank\" rel=\"external\">supported countries in the documentation</a></p>\n<p>You will have to start the server with this command:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">node app.js</div></pre></td></tr></table></figure>\n<p>open <a href=\"http://localhost:3000\" target=\"_blank\" rel=\"external\">http://localhost:3000</a> in your browser, you will be required to create an admin account on the first page.</p>\n<p><img src=\"images/success.jpg\" alt=\"Success\"></p>\n<p>Congratulation! your setup is working!</p>\n<h3 id=\"Using-a-Docker-container\"><a href=\"#Using-a-Docker-container\" class=\"headerlink\" title=\"Using a Docker container\"></a>Using a Docker container</h3><p><a href=\"https://hub.docker.com/r/webinage/gadael\" target=\"_blank\" rel=\"external\">https://hub.docker.com/r/webinage/gadael</a></p>\n<h3 id=\"Use-the-SaaS-version\"><a href=\"#Use-the-SaaS-version\" class=\"headerlink\" title=\"Use the SaaS version\"></a>Use the SaaS version</h3><p>If you have no server available and want to take advantage of automatic updates to the last version, you can use Gadael directly from <a href=\"https://www.gadael.com/\" target=\"_blank\" rel=\"external\">gadael.com</a>, it’s free for team up to 5 users. If you choose to subscribe to a paid plan you will benefit from the email technical support for all your configuration problems.</p>\n<h3 id=\"Set-up-a-reverse-proxy\"><a href=\"#Set-up-a-reverse-proxy\" class=\"headerlink\" title=\"Set up a reverse proxy\"></a>Set up a reverse proxy</h3><p>Application listen on localhost only by default, an https reverse proxy will be necessary to open access to users. This will add the ability to serve the application on the default port.</p>\n<p>The examples given here are on a Debian system, a similar setup is possible with another distribution or package manager. We will use mydomain.com as an example URL, you must have a domain name already configured and linked to the web server by DNS configuration.</p>\n<h4 id=\"Using-the-Apache-web-server\"><a href=\"#Using-the-Apache-web-server\" class=\"headerlink\" title=\"Using the Apache web server\"></a>Using the Apache web server</h4><p>So first of all, we need to install <a href=\"https://httpd.apache.org/\" target=\"_blank\" rel=\"external\">Apache2</a>:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\">apt update</div><div class=\"line\">apt install apache2</div></pre></td></tr></table></figure>\n<p>Next thing we’ll have to do is proxy all request incoming on port 80 to the gadael local port. For this, we need to install/enable mod_proxy and mod_proxy_http modules on the Apache server:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\">a2enmod proxy</div><div class=\"line\">a2enmod proxy_http</div></pre></td></tr></table></figure>\n<p>Then we’ll configure a VirtualHost like this:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">vi /etc/apache2/sites-available/gadael.conf</div></pre></td></tr></table></figure>\n<p>With the content:</p>\n<figure class=\"highlight plain\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div><div class=\"line\">12</div><div class=\"line\">13</div><div class=\"line\">14</div><div class=\"line\">15</div><div class=\"line\">16</div><div class=\"line\">17</div><div class=\"line\">18</div></pre></td><td class=\"code\"><pre><div class=\"line\"><VirtualHost *:80></div><div class=\"line\"> ServerAdmin [email protected]</div><div class=\"line\"> ServerName mydomain.com</div><div class=\"line\"></div><div class=\"line\"> ProxyRequests Off</div><div class=\"line\"> <Proxy *></div><div class=\"line\"> Require all granted</div><div class=\"line\"> </Proxy></div><div class=\"line\"></div><div class=\"line\"> <Location /nodejsAppli></div><div class=\"line\"> ProxyPass http://127.0.0.1:3000</div><div class=\"line\"> ProxyPassReverse http://1127.0.0.1:3000</div><div class=\"line\"> </Location></div><div class=\"line\"></div><div class=\"line\"> ErrorLog ${APACHE_LOG_DIR}/gadael-error.log</div><div class=\"line\"> CustomLog ${APACHE_LOG_DIR}/access.log combined</div><div class=\"line\"></div><div class=\"line\"></VirtualHost></div></pre></td></tr></table></figure>\n<p>The new virtual host need to be enabled before restarting apache:</p>\n<figure class=\"highlight plain\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\">a2ensite mySite.conf</div><div class=\"line\">servicectrl restart apache2</div></pre></td></tr></table></figure>\n<p>After this last step, you can access your application using only <a href=\"http://mydomain.com/\" target=\"_blank\" rel=\"external\">http://mydomain.com/</a>. This configuration can be enhanced by adding ssl certificates for the HTTPS protocol.</p>\n<h4 id=\"Using-the-nginx-web-server\"><a href=\"#Using-the-nginx-web-server\" class=\"headerlink\" title=\"Using the nginx web server\"></a>Using the nginx web server</h4><p>Install <a href=\"https://nginx.org/en/\" target=\"_blank\" rel=\"external\">nginx</a>:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\">apt update</div><div class=\"line\">apt install nginx</div></pre></td></tr></table></figure>\n<p>Edit the default site configuration:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">vi /etc/nginx/sites-available/default</div></pre></td></tr></table></figure>\n<p>Setting this content will redirect request from port 80 the the port 3000. If a port different than 3000 was used in your gadael configuration, you must change the <code>proxy_pass</code> line.</p>\n<figure class=\"highlight plain\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div><div class=\"line\">12</div><div class=\"line\">13</div></pre></td><td class=\"code\"><pre><div class=\"line\">server {</div><div class=\"line\"> listen 80;</div><div class=\"line\"> server_name mydomain.com;</div><div class=\"line\"></div><div class=\"line\"> location / {</div><div class=\"line\"> proxy_pass http://127.0.0.1:3000;</div><div class=\"line\"> proxy_http_version 1.1;</div><div class=\"line\"> proxy_set_header Upgrade $http_upgrade;</div><div class=\"line\"> proxy_set_header Connection 'upgrade';</div><div class=\"line\"> proxy_set_header Host $host;</div><div class=\"line\"> proxy_cache_bypass $http_upgrade;</div><div class=\"line\"> }</div><div class=\"line\">}</div></pre></td></tr></table></figure>\n<p>A restart of the server is required:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">systemctrl restart nginx</div></pre></td></tr></table></figure>\n<h2 id=\"Configure-a-custom-login-strategy\"><a href=\"#Configure-a-custom-login-strategy\" class=\"headerlink\" title=\"Configure a custom login strategy\"></a>Configure a custom login strategy</h2><p>Login options are stored in the company document in database</p>\n<p>Add a CAS authentication method with the command line mongo client :</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div></pre></td><td class=\"code\"><pre><div class=\"line\">$ mongo gadael</div><div class=\"line\">> var company = db.companies.find()[0];</div><div class=\"line\">> company.loginservices.cas = { <span class=\"string\">\"ssoBaseURL\"</span> : <span class=\"string\">\"https://....\"</span>, <span class=\"string\">\"enable\"</span> : <span class=\"literal\">true</span> }</div><div class=\"line\">> db.companies.update({ <span class=\"string\">\"_id\"</span>: company._id }, company);</div></pre></td></tr></table></figure>\n<h2 id=\"Working-with-the-API\"><a href=\"#Working-with-the-API\" class=\"headerlink\" title=\"Working with the API\"></a>Working with the API</h2><p>gadael allows to use the API to exchange with the database in the same way as the web interface. To do this, you need to create a specific user with the administrator role.</p>\n<p><img src=\"images/create_api_access.png\" alt=\"Creation link position in UI\"></p>\n<p>The obtained API key allow to authenticate with oauth2.</p>\n<p>This is the list of paths with API access enabled by default:</p>\n<p>api/admin/users<br>api/admin/usersstat<br>api/admin/accountrights<br>api/admin/accountcollections<br>api/admin/departments<br>api/admin/calendars<br>api/admin/calendarevents<br>api/admin/personalevents<br>api/admin/collaborators<br>api/admin/unavailableevents<br>api/admin/types<br>api/admin/specialrights<br>api/admin/rights<br>api/admin/rightrenewals<br>api/admin/accountbeneficiaries<br>api/admin/beneficiaries<br>api/admin/requests<br>api/admin/waitingrequests<br>api/admin/export<br>api/admin/consumption<br>api/admin/invitations</p>\n<h3 id=\"Use-the-API-to-get-the-users-list\"><a href=\"#Use-the-API-to-get-the-users-list\" class=\"headerlink\" title=\"Use the API to get the users list\"></a>Use the API to get the users list</h3><p>step 1, get an access token:<br><figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"variable\">$curl</span> -X POST <span class=\"_\">-d</span> <span class=\"string\">\"grant_type=client_credentials&client_id=<your client ID>&client_secret=<your client secret>\"</span> https://demo.gadael.com/login/oauth-token</div><div class=\"line\"></div><div class=\"line\">{<span class=\"string\">\"access_token\"</span>:<span class=\"string\">\"55d99b2af2a2b2a914120e6e4b6e13f6bdbf88ed\"</span>,<span class=\"string\">\"token_type\"</span>:<span class=\"string\">\"Bearer\"</span>,<span class=\"string\">\"expires_in\"</span>:3599,<span class=\"string\">\"scope\"</span>:[]}</div></pre></td></tr></table></figure></p>\n<p>step 2, use access token to get the list of users:<br><figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"variable\">$curl</span> -H <span class=\"string\">\"Authorization: Bearer 55d99b2af2a2b2a914120e6e4b6e13f6bdbf88ed\"</span> https://demo.gadael.com/api/admin/users</div><div class=\"line\"></div><div class=\"line\">[...]</div></pre></td></tr></table></figure></p>\n","excerpt":"","more":"<h2 id=\"Functionalities\"><a href=\"#Functionalities\" class=\"headerlink\" title=\"Functionalities\"></a>Functionalities</h2><p>Gadael is a powerful leave management application with rights attributions based on complex rules and periods planing. With Gadael you can:</p>\n<ul>\n<li>Schedule multiples leave renewal periods in advance.</li>\n<li>Automatically make adjustments of quantity based on the consumption on other rights.</li>\n<li>Export your data for your payslip application.</li>\n<li>Sync plannings with your google calendars.</li>\n<li>Set up a policy for overtime recovery in the form of holiday entitlements.</li>\n<li>Multi-level approval work-flow</li>\n</ul>\n<p><img src=\"images/devices.png\" alt=\"All devices compatible\"></p>\n<h2 id=\"Install\"><a href=\"#Install\" class=\"headerlink\" title=\"Install\"></a>Install</h2><h3 id=\"With-git-and-NPM\"><a href=\"#With-git-and-NPM\" class=\"headerlink\" title=\"With git and NPM\"></a>With git and NPM</h3><p>Gadael can be installed from the git version, this is the best choice for taking advantage of the lastest features. For this to work, some dependencies need to be installed on the system first, you will have to install the dependencies using your system packages manager or manually.</p>\n<ul>\n<li><a href=\"https://nodejs.org/\">nodejs</a></li>\n<li><a href=\"https://www.mongodb.com/\">MongoDB</a>, the database server, version 3 is required.</li>\n<li><a href=\"https://git-scm.com/\">git</a>, this is the version control system used for Gadael development</li>\n<li><a href=\"https://www.npmjs.com/\">npm</a>, for nodejs dependencies</li>\n<li><a href=\"https://bower.io/\">bower</a>, for front-end dependencies</li>\n</ul>\n<p>Then the install process can be resumed with this list of commands:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div></pre></td><td class=\"code\"><pre><div class=\"line\">git <span class=\"built_in\">clone</span> https://github.com/gadael/gadael</div><div class=\"line\"><span class=\"built_in\">cd</span> gadael</div><div class=\"line\">npm install --production</div><div class=\"line\">bower install</div></pre></td></tr></table></figure>\n<p>Create the config file:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">cp config.example.js config.js</div></pre></td></tr></table></figure>\n<p>You will have to configure an SMTP host and a root url in this file for the emails notifications to work correctly.</p>\n<p>Database initialization:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">node install.js gadael <span class=\"string\">\"Your company name\"</span> FR</div></pre></td></tr></table></figure>\n<p>First argument is the database name, default is gadael.<br>Second argument is your company name, default is “Gadael”.<br>Third argument is the country code used to initialize the database, if not provided the leave rights list will be empty. You can check the list of <a href=\"https://www.gadael.com/en/docs/version-master/008-the-countries.html\">supported countries in the documentation</a></p>\n<p>You will have to start the server with this command:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">node app.js</div></pre></td></tr></table></figure>\n<p>open <a href=\"http://localhost:3000\">http://localhost:3000</a> in your browser, you will be required to create an admin account on the first page.</p>\n<p><img src=\"images/success.jpg\" alt=\"Success\"></p>\n<p>Congratulation! your setup is working!</p>\n<h3 id=\"Using-a-Docker-container\"><a href=\"#Using-a-Docker-container\" class=\"headerlink\" title=\"Using a Docker container\"></a>Using a Docker container</h3><p><a href=\"https://hub.docker.com/r/webinage/gadael\">https://hub.docker.com/r/webinage/gadael</a></p>\n<h3 id=\"Use-the-SaaS-version\"><a href=\"#Use-the-SaaS-version\" class=\"headerlink\" title=\"Use the SaaS version\"></a>Use the SaaS version</h3><p>If you have no server available and want to take advantage of automatic updates to the last version, you can use Gadael directly from <a href=\"https://www.gadael.com/\">gadael.com</a>, it’s free for team up to 5 users. If you choose to subscribe to a paid plan you will benefit from the email technical support for all your configuration problems.</p>\n<h3 id=\"Set-up-a-reverse-proxy\"><a href=\"#Set-up-a-reverse-proxy\" class=\"headerlink\" title=\"Set up a reverse proxy\"></a>Set up a reverse proxy</h3><p>Application listen on localhost only by default, an https reverse proxy will be necessary to open access to users. This will add the ability to serve the application on the default port.</p>\n<p>The examples given here are on a Debian system, a similar setup is possible with another distribution or package manager. We will use mydomain.com as an example URL, you must have a domain name already configured and linked to the web server by DNS configuration.</p>\n<h4 id=\"Using-the-Apache-web-server\"><a href=\"#Using-the-Apache-web-server\" class=\"headerlink\" title=\"Using the Apache web server\"></a>Using the Apache web server</h4><p>So first of all, we need to install <a href=\"https://httpd.apache.org/\">Apache2</a>:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\">apt update</div><div class=\"line\">apt install apache2</div></pre></td></tr></table></figure>\n<p>Next thing we’ll have to do is proxy all request incoming on port 80 to the gadael local port. For this, we need to install/enable mod_proxy and mod_proxy_http modules on the Apache server:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\">a2enmod proxy</div><div class=\"line\">a2enmod proxy_http</div></pre></td></tr></table></figure>\n<p>Then we’ll configure a VirtualHost like this:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">vi /etc/apache2/sites-available/gadael.conf</div></pre></td></tr></table></figure>\n<p>With the content:</p>\n<figure class=\"highlight plain\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div><div class=\"line\">12</div><div class=\"line\">13</div><div class=\"line\">14</div><div class=\"line\">15</div><div class=\"line\">16</div><div class=\"line\">17</div><div class=\"line\">18</div></pre></td><td class=\"code\"><pre><div class=\"line\"><VirtualHost *:80></div><div class=\"line\"> ServerAdmin [email protected]</div><div class=\"line\"> ServerName mydomain.com</div><div class=\"line\"></div><div class=\"line\"> ProxyRequests Off</div><div class=\"line\"> <Proxy *></div><div class=\"line\"> Require all granted</div><div class=\"line\"> </Proxy></div><div class=\"line\"></div><div class=\"line\"> <Location /nodejsAppli></div><div class=\"line\"> ProxyPass http://127.0.0.1:3000</div><div class=\"line\"> ProxyPassReverse http://1127.0.0.1:3000</div><div class=\"line\"> </Location></div><div class=\"line\"></div><div class=\"line\"> ErrorLog ${APACHE_LOG_DIR}/gadael-error.log</div><div class=\"line\"> CustomLog ${APACHE_LOG_DIR}/access.log combined</div><div class=\"line\"></div><div class=\"line\"></VirtualHost></div></pre></td></tr></table></figure>\n<p>The new virtual host need to be enabled before restarting apache:</p>\n<figure class=\"highlight plain\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\">a2ensite mySite.conf</div><div class=\"line\">servicectrl restart apache2</div></pre></td></tr></table></figure>\n<p>After this last step, you can access your application using only <a href=\"http://mydomain.com/\">http://mydomain.com/</a>. This configuration can be enhanced by adding ssl certificates for the HTTPS protocol.</p>\n<h4 id=\"Using-the-nginx-web-server\"><a href=\"#Using-the-nginx-web-server\" class=\"headerlink\" title=\"Using the nginx web server\"></a>Using the nginx web server</h4><p>Install <a href=\"https://nginx.org/en/\">nginx</a>:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div></pre></td><td class=\"code\"><pre><div class=\"line\">apt update</div><div class=\"line\">apt install nginx</div></pre></td></tr></table></figure>\n<p>Edit the default site configuration:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">vi /etc/nginx/sites-available/default</div></pre></td></tr></table></figure>\n<p>Setting this content will redirect request from port 80 the the port 3000. If a port different than 3000 was used in your gadael configuration, you must change the <code>proxy_pass</code> line.</p>\n<figure class=\"highlight plain\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div><div class=\"line\">5</div><div class=\"line\">6</div><div class=\"line\">7</div><div class=\"line\">8</div><div class=\"line\">9</div><div class=\"line\">10</div><div class=\"line\">11</div><div class=\"line\">12</div><div class=\"line\">13</div></pre></td><td class=\"code\"><pre><div class=\"line\">server {</div><div class=\"line\"> listen 80;</div><div class=\"line\"> server_name mydomain.com;</div><div class=\"line\"></div><div class=\"line\"> location / {</div><div class=\"line\"> proxy_pass http://127.0.0.1:3000;</div><div class=\"line\"> proxy_http_version 1.1;</div><div class=\"line\"> proxy_set_header Upgrade $http_upgrade;</div><div class=\"line\"> proxy_set_header Connection 'upgrade';</div><div class=\"line\"> proxy_set_header Host $host;</div><div class=\"line\"> proxy_cache_bypass $http_upgrade;</div><div class=\"line\"> }</div><div class=\"line\">}</div></pre></td></tr></table></figure>\n<p>A restart of the server is required:</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div></pre></td><td class=\"code\"><pre><div class=\"line\">systemctrl restart nginx</div></pre></td></tr></table></figure>\n<h2 id=\"Configure-a-custom-login-strategy\"><a href=\"#Configure-a-custom-login-strategy\" class=\"headerlink\" title=\"Configure a custom login strategy\"></a>Configure a custom login strategy</h2><p>Login options are stored in the company document in database</p>\n<p>Add a CAS authentication method with the command line mongo client :</p>\n<figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div><div class=\"line\">4</div></pre></td><td class=\"code\"><pre><div class=\"line\">$ mongo gadael</div><div class=\"line\">> var company = db.companies.find()[0];</div><div class=\"line\">> company.loginservices.cas = { <span class=\"string\">\"ssoBaseURL\"</span> : <span class=\"string\">\"https://....\"</span>, <span class=\"string\">\"enable\"</span> : <span class=\"literal\">true</span> }</div><div class=\"line\">> db.companies.update({ <span class=\"string\">\"_id\"</span>: company._id }, company);</div></pre></td></tr></table></figure>\n<h2 id=\"Working-with-the-API\"><a href=\"#Working-with-the-API\" class=\"headerlink\" title=\"Working with the API\"></a>Working with the API</h2><p>gadael allows to use the API to exchange with the database in the same way as the web interface. To do this, you need to create a specific user with the administrator role.</p>\n<p><img src=\"images/create_api_access.png\" alt=\"Creation link position in UI\"></p>\n<p>The obtained API key allow to authenticate with oauth2.</p>\n<p>This is the list of paths with API access enabled by default:</p>\n<p>api/admin/users<br>api/admin/usersstat<br>api/admin/accountrights<br>api/admin/accountcollections<br>api/admin/departments<br>api/admin/calendars<br>api/admin/calendarevents<br>api/admin/personalevents<br>api/admin/collaborators<br>api/admin/unavailableevents<br>api/admin/types<br>api/admin/specialrights<br>api/admin/rights<br>api/admin/rightrenewals<br>api/admin/accountbeneficiaries<br>api/admin/beneficiaries<br>api/admin/requests<br>api/admin/waitingrequests<br>api/admin/export<br>api/admin/consumption<br>api/admin/invitations</p>\n<h3 id=\"Use-the-API-to-get-the-users-list\"><a href=\"#Use-the-API-to-get-the-users-list\" class=\"headerlink\" title=\"Use the API to get the users list\"></a>Use the API to get the users list</h3><p>step 1, get an access token:<br><figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"variable\">$curl</span> -X POST <span class=\"_\">-d</span> <span class=\"string\">\"grant_type=client_credentials&client_id=<your client ID>&client_secret=<your client secret>\"</span> https://demo.gadael.com/login/oauth-token</div><div class=\"line\"></div><div class=\"line\">{<span class=\"string\">\"access_token\"</span>:<span class=\"string\">\"55d99b2af2a2b2a914120e6e4b6e13f6bdbf88ed\"</span>,<span class=\"string\">\"token_type\"</span>:<span class=\"string\">\"Bearer\"</span>,<span class=\"string\">\"expires_in\"</span>:3599,<span class=\"string\">\"scope\"</span>:[]}</div></pre></td></tr></table></figure></p>\n<p>step 2, use access token to get the list of users:<br><figure class=\"highlight bash\"><table><tr><td class=\"gutter\"><pre><div class=\"line\">1</div><div class=\"line\">2</div><div class=\"line\">3</div></pre></td><td class=\"code\"><pre><div class=\"line\"><span class=\"variable\">$curl</span> -H <span class=\"string\">\"Authorization: Bearer 55d99b2af2a2b2a914120e6e4b6e13f6bdbf88ed\"</span> https://demo.gadael.com/api/admin/users</div><div class=\"line\"></div><div class=\"line\">[...]</div></pre></td></tr></table></figure></p>\n"}],"PostAsset":[],"PostCategory":[],"PostTag":[],"Tag":[]}}