Skip to content

Commit

Permalink
Fix agent viewer access for leave bot (#1579)
Browse files Browse the repository at this point in the history
* fixed user name issue in the audit log for leave bot api

* fixed user name issue in the audit log for leave bot api
  • Loading branch information
GMayank0310 authored Oct 22, 2024
1 parent 70fa183 commit 86d2313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kairon/api/app/routers/user.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from fastapi import APIRouter, Path, Security
from starlette.requests import Request

from kairon.shared.constants import ADMIN_ACCESS, TESTER_ACCESS, OWNER_ACCESS
from kairon.shared.constants import ADMIN_ACCESS, TESTER_ACCESS, OWNER_ACCESS, AGENT_ACCESS
from kairon.shared.data.constant import ACCESS_ROLES, ACTIVITY_STATUS
from kairon.shared.multilingual.utils.translator import Translator
from kairon.shared.utils import Utility, MailUtility
Expand Down Expand Up @@ -244,7 +244,7 @@ async def get_model_testing_logs_accuracy(
async def leave_bot(
background_tasks: BackgroundTasks,
bot: str = Path(description="bot id", examples=["613f63e87a1d435607c3c183"]),
current_user: User = Security(Authentication.get_current_user_and_bot, scopes=TESTER_ACCESS)
current_user: User = Security(Authentication.get_current_user_and_bot, scopes=AGENT_ACCESS)
):
"""
Allows a user except owner to leave a bot.
Expand Down

0 comments on commit 86d2313

Please sign in to comment.