INNER CODE UNIT · Python

get_security_specs

fescobar/allure-docker-service · allure-docker-api/app.py:363

def get_security_specs():
    security_specs = {}
    for file in os.listdir("{}/{}/".format(STATIC_CONTENT, SECURITY_SPECS_PATH)):
        file_path = "{}/{}/{}".format(STATIC_CONTENT, SECURITY_SPECS_PATH, file)
        security_specs[file] = eval(get_file_as_string(file_path)) #pylint: disable=eval-used
    return security_specs

def is_endpoint_protected(endpoint):
    if MAKE_VIEWER_ENDPOINTS_PUBLIC is False:
        return True

    for info in PROTECTED_ENDPOINTS:
        if endpoint == info['endpoint']:
            return True
    return False

def is_endpoint_swagger_protected(method, path):
    if MAKE_VIEWER_ENDPOINTS_PUBLIC is False:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…