mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 19:28:07 +00:00
Do not enforce Compute.Audit and Template.Audit privileges due to current web-ui limitations
This commit is contained in:
parent
109feeb647
commit
47d3f3f349
@ -64,7 +64,7 @@ async def create_compute(
|
|||||||
@router.post(
|
@router.post(
|
||||||
"/{compute_id}/connect",
|
"/{compute_id}/connect",
|
||||||
status_code=status.HTTP_204_NO_CONTENT,
|
status_code=status.HTTP_204_NO_CONTENT,
|
||||||
dependencies=[Depends(has_privilege("Compute.Audit"))]
|
#dependencies=[Depends(has_privilege("Compute.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
|
||||||
)
|
)
|
||||||
async def connect_compute(compute_id: Union[str, UUID]) -> None:
|
async def connect_compute(compute_id: Union[str, UUID]) -> None:
|
||||||
"""
|
"""
|
||||||
@ -82,7 +82,7 @@ async def connect_compute(compute_id: Union[str, UUID]) -> None:
|
|||||||
"/{compute_id}",
|
"/{compute_id}",
|
||||||
response_model=schemas.Compute,
|
response_model=schemas.Compute,
|
||||||
response_model_exclude_unset=True,
|
response_model_exclude_unset=True,
|
||||||
dependencies=[Depends(has_privilege("Compute.Audit"))]
|
#dependencies=[Depends(has_privilege("Compute.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
|
||||||
)
|
)
|
||||||
async def get_compute(
|
async def get_compute(
|
||||||
compute_id: Union[str, UUID], computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository))
|
compute_id: Union[str, UUID], computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository))
|
||||||
@ -100,7 +100,7 @@ async def get_compute(
|
|||||||
"",
|
"",
|
||||||
response_model=List[schemas.Compute],
|
response_model=List[schemas.Compute],
|
||||||
response_model_exclude_unset=True,
|
response_model_exclude_unset=True,
|
||||||
dependencies=[Depends(has_privilege("Compute.Audit"))]
|
#dependencies=[Depends(has_privilege("Compute.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
|
||||||
)
|
)
|
||||||
async def get_computes(
|
async def get_computes(
|
||||||
computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository)),
|
computes_repo: ComputesRepository = Depends(get_repository(ComputesRepository)),
|
||||||
|
@ -68,7 +68,8 @@ async def create_template(
|
|||||||
"/{template_id}",
|
"/{template_id}",
|
||||||
response_model=schemas.Template,
|
response_model=schemas.Template,
|
||||||
response_model_exclude_unset=True,
|
response_model_exclude_unset=True,
|
||||||
dependencies=[Depends(has_privilege("Template.Audit"))]
|
dependencies=[Depends(get_current_active_user)],
|
||||||
|
#dependencies=[Depends(has_privilege("Template.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
|
||||||
)
|
)
|
||||||
async def get_template(
|
async def get_template(
|
||||||
template_id: UUID,
|
template_id: UUID,
|
||||||
@ -141,7 +142,8 @@ async def delete_template(
|
|||||||
"",
|
"",
|
||||||
response_model=List[schemas.Template],
|
response_model=List[schemas.Template],
|
||||||
response_model_exclude_unset=True,
|
response_model_exclude_unset=True,
|
||||||
dependencies=[Depends(has_privilege("Template.Audit"))]
|
dependencies=[Depends(get_current_active_user)],
|
||||||
|
#dependencies=[Depends(has_privilege("Template.Audit"))] # FIXME: this is a temporary workaround due to a bug in the web-ui
|
||||||
)
|
)
|
||||||
async def get_templates(
|
async def get_templates(
|
||||||
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
|
templates_repo: TemplatesRepository = Depends(get_repository(TemplatesRepository)),
|
||||||
|
Loading…
Reference in New Issue
Block a user