Skip to content

Commit

Permalink
[FIX] Core access security system
Browse files Browse the repository at this point in the history
[ADD] new default data
[ADD] action field access_write to handle action that require write privilege in form
[FIX] minor fix
  • Loading branch information
archetipo committed Aug 4, 2021
1 parent 8fef472 commit cbd36d2
Show file tree
Hide file tree
Showing 17 changed files with 4,266 additions and 37 deletions.
13 changes: 12 additions & 1 deletion backend/ozon/api_base.py
Expand Up @@ -5,6 +5,7 @@
from .appinit import *
import ujson
from .core.ServiceMain import ServiceMain
from json import JSONDecodeError


# TODO component base move to frontend
Expand Down Expand Up @@ -243,7 +244,17 @@ async def get_distinct_model(
session.app['save_session'] = False
service = ServiceMain.new(request=request)
props = request.query_params.__dict__['_dict'].copy()
domain = json.loads(props.get("domain", "{}"))
query = props.get("domain", "{}")
# logger.info(tyep(query))
logger.info(query)
try:
domain = json.loads(query)
except JSONDecodeError as e:
return {
"status": "error",
"message": f'Errore Nella codifica del json {query} verifica double quote ',
"model": model
}
res = await service.service_distinct_rec_name_by_model(
model_name=model, domain=domain, props=props)
return res
Expand Down
2 changes: 1 addition & 1 deletion backend/ozon/base/data/action.json

Large diffs are not rendered by default.

0 comments on commit cbd36d2

Please sign in to comment.