Skip to content

Commit

Permalink
feat: eri admin 新增用户身份鉴权 --story=119892878
Browse files Browse the repository at this point in the history
  • Loading branch information
benero committed Oct 16, 2024
1 parent 833ec9d commit cb7663c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,3 +969,6 @@ def redirect_func(request):

# SMS 邀请评价限额
TICKET_INVITE_SMS_COUNT = int(os.getenv("BKAPP_TICKET_INVITE_SMS_COUNT", 10))

# eri admin
PIPELINE_ENGINE_ADMIN_API_PERMISSION = "itsm.helper.permissions.check_permission_success"
6 changes: 6 additions & 0 deletions itsm/helper/permissions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-


# eri admin 鉴权
def check_permission_success(request, *args, **kwargs):
return request.user.is_superuser

0 comments on commit cb7663c

Please sign in to comment.