* Add permissions to Database & add "User"-classes
* Add UI & API for Permissions, protect "User"-(Api)-Controller with new permissions.
* Add some permissions.
* Add permission localization
* Add error handling.
* Error pages: only redirect on 404
* ExceptionController: return JSON-Response on api-routes
* Rename PRODUCT_ADD to PRODUCT_PURCHASE
* Move translation to new file
* Fix checkboxes stay selected on reload.
* Remove configurable User-implementation
* Remove MASTER_DATA_READ
* Disable buttons the user isn't allowed to use.
* Add default permissions for new users
* When migration to permissions, everyone starts as ADMIN
* Permission-Localization: add to transifex & LocalizationService
* Review
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
* Fixes#956. Return 404 for missing objects in GenericEntityApiController.php
* Fixes#936 and #943. Include Products that expire today in /stock/volatile and "Expiring soon"-sum on stockoverview
* Fixes#881. Remove items of deleted shopping lists.
* Fixes#875. Prevent infinite nested recipes.
* Review
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
* Fixgrocy/grocy#834
* stock_missing_products_including_opened didn't take the opened amount in HAVING clauses
* Resolved merge conflicts
Co-authored-by: Bernd Bestel <bernd@berrnd.de>
Since the value of $('#amount') will be written to the database it should not be locale dependent. This code also limits the result to a maximum of 4 digits but always uses a dot as decimal separator.
Previously the data directory was fixed to the GROCY_DATAPATH constant.
This commit allows overriding the default GROCY_DATAPATH location by the
FastCGI parameter `GROCY_DATAPATH`. Relative paths are modified and get
rooted at the top level grocy installation directory.
The previous behaviour is preserved in case the new parameter is absent.
The following example nginx config snippet shows how to run multiple
instances.
```nginx
server {
location /instance1/ {
alias /var/www/grocy/;
set $instance instance1;
try_files $uri @grocy;
}
location /instane2/ {
alias /var/www/grocy/;
set $instance instance2;
try_files $uri @grocy;
}
location @grocy {
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME index.php;
fastcgi_param GROCY_DATAPATH data/$instance;
}
}
```