endpoint_restriction_available updated
This commit is contained in:
parent
73645ce3ca
commit
39a839c43c
|
|
@ -33,7 +33,7 @@ class Config:
|
||||||
]
|
]
|
||||||
NOT_SECURE_PATHS = [
|
NOT_SECURE_PATHS = [
|
||||||
"/access/endpoints/available",
|
"/access/endpoints/available",
|
||||||
"/access/endpoint/available"
|
"/access/endpoint/available",
|
||||||
"/validations/endpoint",
|
"/validations/endpoint",
|
||||||
"/authentication/avatar",
|
"/authentication/avatar",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ def endpoint_restriction_list(request: Request):
|
||||||
|
|
||||||
|
|
||||||
@endpoint_restriction_route.post(
|
@endpoint_restriction_route.post(
|
||||||
path="/endpoint/available", summary="List extra restriction to endpoints list"
|
path="/endpoint/available", summary="Check extra restriction to endpoint available"
|
||||||
)
|
)
|
||||||
def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
|
def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
|
||||||
token_dict, records = parse_token_object_to_dict(request=request), []
|
token_dict, records = parse_token_object_to_dict(request=request), []
|
||||||
|
|
@ -96,7 +96,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
|
||||||
EndpointRestriction.raise_http_exception(
|
EndpointRestriction.raise_http_exception(
|
||||||
status_code="HTTP_404_NOT_FOUND",
|
status_code="HTTP_404_NOT_FOUND",
|
||||||
error_case="UNAUTHORIZED",
|
error_case="UNAUTHORIZED",
|
||||||
message="Only Occupant can see this data",
|
message="This endpoint is not available for this occupant",
|
||||||
data={},
|
data={},
|
||||||
)
|
)
|
||||||
return dict(
|
return dict(
|
||||||
|
|
@ -112,7 +112,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
|
||||||
EndpointRestriction.raise_http_exception(
|
EndpointRestriction.raise_http_exception(
|
||||||
status_code="HTTP_404_NOT_FOUND",
|
status_code="HTTP_404_NOT_FOUND",
|
||||||
error_case="UNAUTHORIZED",
|
error_case="UNAUTHORIZED",
|
||||||
message="Only Occupant can see this data",
|
message="This endpoint is not available for this employee",
|
||||||
data={},
|
data={},
|
||||||
)
|
)
|
||||||
return dict(
|
return dict(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue