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:45:45 +02:00
parent fa5387e814
commit c2a066fc71
3 changed files with 11 additions and 3 deletions

View File

@ -7,6 +7,8 @@ Created on: 15.12.20
"""
from django.utils.translation import gettext_lazy as _
from konova.settings import DEFAULT_GROUP, ZB_GROUP, ETS_GROUP
TEST_ORGANISATION_DATA = [
{
"name": "Test_Official_1",
@ -24,12 +26,12 @@ TEST_ORGANISATION_DATA = [
GROUPS_DATA = [
{
"name": _("Default"),
"name": DEFAULT_GROUP,
},
{
"name": _("Registration office"),
"name": ZB_GROUP,
},
{
"name": _("Conservation office"),
"name": ETS_GROUP,
},
]

View File

@ -68,3 +68,4 @@ class Geometry(BaseResource):
Outsourced geometry model so multiple versions of the same object can refer to the same geometry if it is not changed
"""
geom = MultiPolygonField(null=True, blank=True)

View File

@ -49,3 +49,8 @@ SSO_PUBLIC_KEY = "AGGK7E8eT5X5u2GD38ygGG3GpAefmIldJiiWW7gldRPqCG1CzmUfGdvPSGDbEY
DEFAULT_LAT = 50.00
DEFAULT_LON = 7.00
DEFAULT_ZOOM = 8.0
# GROUPS
DEFAULT_GROUP = _("Default")
ZB_GROUP = _("Registration office")
ETS_GROUP = _("Conservation office")