Permission rethinking

* No detailed permissions due to django constraints on model-based permissions
* instead: logic controlled permission by group membership
* adds translations
This commit is contained in:
mipel 2021-07-02 09:31:09 +02:00
parent 32370a0a7e
commit 980d57958b
2 changed files with 0 additions and 26 deletions

View File

@ -7,10 +7,6 @@ Created on: 15.12.20
"""
from django.utils.translation import gettext_lazy as _
from konova.settings import ADD_INTERVENTION, CREATE_SHARE_LINK, DELETE_ECOACCOUNT, EDIT_ECOACCOUNT, ADD_ECOACCOUNT, \
DELETE_COMPENSATION, EDIT_COMPENSATION, ADD_COMPENSATION, DELETE_INTERVENTION, EDIT_INTERVENTION, VALIDITY_CHECK, \
DELETE_EMA, EDIT_EMA, ADD_EMA, RECORD_DATA
TEST_ORGANISATION_DATA = [
{
"name": "Test_Official_1",

View File

@ -49,25 +49,3 @@ SSO_PUBLIC_KEY = "AGGK7E8eT5X5u2GD38ygGG3GpAefmIldJiiWW7gldRPqCG1CzmUfGdvPSGDbEY
DEFAULT_LAT = 50.00
DEFAULT_LON = 7.00
DEFAULT_ZOOM = 8.0
# PERMISSION VALUES
## Group default
ADD_INTERVENTION = ("add_intervention", _("Add new intervention"))
EDIT_INTERVENTION = ("edit_intervention", _("Edit intervention"))
DELETE_INTERVENTION = ("delete_intervention", _("Delete intervention"))
ADD_COMPENSATION = ("add_compensation", _("Add new compensation"))
EDIT_COMPENSATION = ("edit_compensation", _("Edit compensation"))
DELETE_COMPENSATION = ("delete_compensation", _("Delete compensation"))
ADD_ECOACCOUNT = ("add_ecoaccount", _("Add new eco account"))
EDIT_ECOACCOUNT = ("edit_ecoaccount", _("Edit eco account"))
DELETE_ECOACCOUNT = ("delete_ecoaccount", _("Delete eco account"))
CREATE_SHARE_LINK = ("create_share_link", _("Create share link"))
## Group ZB
VALIDITY_CHECK = ("validity_check", _("Confirm check on data"))
## Group ETS
RECORD_DATA = ("record_data", _("Record data")) # refers to 'verzeichnen'
ADD_EMA = ("add_ema", _("Add new EMA"))
EDIT_EMA = ("edit_ema", _("Edit EMA"))
DELETE_EMA = ("delete_ema", _("Delete EMA"))