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:
		
							parent
							
								
									fa5387e814
								
							
						
					
					
						commit
						c2a066fc71
					
				@ -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,
 | 
			
		||||
        },
 | 
			
		||||
    ]
 | 
			
		||||
@ -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)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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")
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user