Skip to content

Commit

Permalink
ADding operator permission (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtpro authored Nov 3, 2022
1 parent 59c6638 commit 2ddf02d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/api/v1/endpoints/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from constants.base_enum import StrEnum
from core.authentication import AuthorizedUser
from core.authentication import current_active_user
from core.authentication import OperatorRolePermission
from managers.templates import TemplateManager
from managers.templates import get_template_manager
from models.user import User
Expand Down Expand Up @@ -52,7 +53,7 @@ async def create_template_revision(
return created_template


@router.get('/list', response_model=list[TemplateResponseBodySchema], dependencies=[Depends(AuthorizedUser())])
@router.get('/list', response_model=list[TemplateResponseBodySchema], dependencies=[Depends(AuthorizedUser(OperatorRolePermission))])
async def list_organization_templates(
user: User = Depends(current_active_user),
template_manager: TemplateManager = Depends(get_template_manager)
Expand Down

0 comments on commit 2ddf02d

Please sign in to comment.