2021-11-29 06:09:18 +01:00
|
|
|
from ... import acl
|
2021-11-02 15:15:07 +01:00
|
|
|
from halfapi.logging import logger
|
2021-09-02 17:01:36 +02:00
|
|
|
|
|
|
|
ACLS = {
|
2021-11-29 06:09:18 +01:00
|
|
|
'GET' : [
|
|
|
|
{'acl':acl.public},
|
|
|
|
{'acl':acl.random},
|
|
|
|
]
|
2021-09-02 17:01:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
def get(halfapi):
|
2021-11-29 05:43:51 +01:00
|
|
|
"""
|
|
|
|
description:
|
|
|
|
returns the configuration of the domain
|
|
|
|
"""
|
2021-09-02 17:01:36 +02:00
|
|
|
logger.error('%s', halfapi)
|
2022-08-05 09:37:17 +02:00
|
|
|
# TODO: Remove in 0.7.0
|
|
|
|
try:
|
|
|
|
assert 'test' in halfapi['config']['domain']['dummy_domain']['config']
|
|
|
|
except AssertionError as exc:
|
|
|
|
logger.error('No TEST in halfapi[config][domain][dummy_domain][config]')
|
|
|
|
raise exc
|
|
|
|
|
|
|
|
try:
|
|
|
|
assert 'test' in halfapi['config']
|
|
|
|
except AssertionError as exc:
|
|
|
|
logger.error('No TEST in halfapi[config]')
|
|
|
|
raise exc
|
|
|
|
|
|
|
|
return halfapi['config']
|