Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
unify_api2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chaonan
unify_api2
Commits
64d66d9a
Commit
64d66d9a
authored
Mar 06, 2024
by
ZZH
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove qkadmin cid verify 2024-03-6
parent
4aebaae0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
constants.py
unify_api/constants.py
+2
-1
login_auth.py
unify_api/modules/common/procedures/login_auth.py
+3
-3
No files found.
unify_api/constants.py
View file @
64d66d9a
...
@@ -19,6 +19,7 @@ PRODUCT = {
...
@@ -19,6 +19,7 @@ PRODUCT = {
"Ulock"
:
9
,
# 运维开锁工具
"Ulock"
:
9
,
# 运维开锁工具
"ZhiWeiu"
:
10
,
# 智维u
"ZhiWeiu"
:
10
,
# 智维u
"anShiU"
:
12
,
# 安识u
"anShiU"
:
12
,
# 安识u
"qkadmin"
:
13
,
# 清科管理后台u
}
}
...
@@ -484,4 +485,4 @@ S030_TOPIC = ["electric", "soe", "scope", "adio", "scope", "appliance",
...
@@ -484,4 +485,4 @@ S030_TOPIC = ["electric", "soe", "scope", "adio", "scope", "appliance",
"workshop"
,
"log"
]
"workshop"
,
"log"
]
WG_TOPIC
=
[
"tsp"
,
"water"
,
"water_bromake"
,
"ws"
]
WG_TOPIC
=
[
"tsp"
,
"water"
,
"water_bromake"
,
"ws"
]
OSS_NEWS
=
"filedata/official_web/news_info"
OSS_NEWS
=
"filedata/official_web/news_info"
\ No newline at end of file
unify_api/modules/common/procedures/login_auth.py
View file @
64d66d9a
...
@@ -42,7 +42,6 @@ async def get_test(request):
...
@@ -42,7 +42,6 @@ async def get_test(request):
def
is_need_verify
(
path
):
def
is_need_verify
(
path
):
if
SETTING
.
debug_mode
==
1
:
if
SETTING
.
debug_mode
==
1
:
return
False
return
False
if
"swagger"
in
path
:
if
"swagger"
in
path
:
...
@@ -173,8 +172,9 @@ async def auth_verify_cid(request):
...
@@ -173,8 +172,9 @@ async def auth_verify_cid(request):
product
=
PRODUCT
.
get
(
host
)
product
=
PRODUCT
.
get
(
host
)
log
.
info
(
f
"host:{host} product:{product}"
)
log
.
info
(
f
"host:{host} product:{product}"
)
# 智维u, 直接返回
# 智维u, 直接返回
if
product
==
10
:
if
product
in
[
10
,
13
]
:
return
return
cid
,
cids
,
cid_list
=
None
,
None
,
None
cid
,
cids
,
cid_list
=
None
,
None
,
None
# 2. 如果参数传了产品类型, 根据参数获取, 后续修改不再根据host取product
# 2. 如果参数传了产品类型, 根据参数获取, 后续修改不再根据host取product
args
=
request
.
json
args
=
request
.
json
...
@@ -195,7 +195,7 @@ async def auth_verify_cid(request):
...
@@ -195,7 +195,7 @@ async def auth_verify_cid(request):
# 3. 如果参数中包含cid或者cids,cid_list
# 3. 如果参数中包含cid或者cids,cid_list
if
cid
or
cids
or
cid_list
:
if
cid
or
cids
or
cid_list
:
user_id
=
request
.
ctx
.
user_id
user_id
=
request
.
ctx
.
user_id
proxy_id
=
args
.
get
(
"proxy_id"
)
proxy_id
=
args
.
get
(
"proxy_id"
)
# 2.2 从mysql获取
# 2.2 从mysql获取
if
proxy_id
:
if
proxy_id
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment