Skip to content
GitLab
菜单
项目
群组
代码片段
帮助
帮助
支持
社区论坛
快捷键
?
提交反馈
登录/注册
切换导航
菜单
打开侧边栏
Zhang Guoqiang
yobot
提交
9eec0df9
提交
9eec0df9
编辑于
7月 23, 2020
作者:
Lancercmd
浏览文件
Better "unauthorized" output
上级
e86e0b72
变更
2
Hide whitespace changes
Inline
Side-by-side
src/client/ybplugins/settings.py
浏览文件 @
9eec0df9
...
...
@@ -29,10 +29,14 @@ class Setting:
return
redirect
(
url_for
(
'yobot_login'
,
callback
=
request
.
path
))
user
=
User
.
get_by_id
(
session
[
'yobot_user'
])
if
user
.
authority_group
>=
10
:
if
not
user
.
authority_group
>=
100
:
uathname
=
'公会战管理员'
else
:
uathname
=
'成员'
return
await
render_template
(
'unauthorized.html'
,
limit
=
'主人'
,
uath
=
u
ser
.
authority_group
,
uath
=
u
athname
,
)
return
await
render_template
(
'admin/setting.html'
,
...
...
@@ -99,10 +103,14 @@ class Setting:
return
redirect
(
url_for
(
'yobot_login'
,
callback
=
request
.
path
))
user
=
User
.
get_by_id
(
session
[
'yobot_user'
])
if
user
.
authority_group
>=
10
:
if
not
user
.
authority_group
>=
100
:
uathname
=
'公会战管理员'
else
:
uathname
=
'成员'
return
await
render_template
(
'unauthorized.html'
,
limit
=
'主人'
,
uath
=
u
ser
.
authority_group
,
uath
=
u
athname
,
)
return
await
render_template
(
'admin/pool-setting.html'
)
...
...
@@ -160,10 +168,14 @@ class Setting:
return
redirect
(
url_for
(
'yobot_login'
,
callback
=
request
.
path
))
user
=
User
.
get_by_id
(
session
[
'yobot_user'
])
if
user
.
authority_group
>=
10
:
if
not
user
.
authority_group
>=
100
:
uathname
=
'公会战管理员'
else
:
uathname
=
'成员'
return
await
render_template
(
'unauthorized.html'
,
limit
=
'主人'
,
uath
=
u
ser
.
authority_group
,
uath
=
u
athname
,
)
return
await
render_template
(
'admin/users.html'
)
...
...
@@ -253,10 +265,14 @@ class Setting:
return
redirect
(
url_for
(
'yobot_login'
,
callback
=
request
.
path
))
user
=
User
.
get_by_id
(
session
[
'yobot_user'
])
if
user
.
authority_group
>=
10
:
if
not
user
.
authority_group
>=
100
:
uathname
=
'公会战管理员'
else
:
uathname
=
'成员'
return
await
render_template
(
'unauthorized.html'
,
limit
=
'主人'
,
uath
=
u
ser
.
authority_group
,
uath
=
u
athname
,
)
return
await
render_template
(
'admin/groups.html'
)
...
...
src/client/yobot.py
浏览文件 @
9eec0df9
...
...
@@ -34,7 +34,7 @@ else:
class
Yobot
:
Version
=
"[v3.6.4-beta.2]"
Version_id
=
20
3
Version_id
=
20
4
# "git rev-list --count HEAD"
def
__init__
(
self
,
*
,
...
...
编辑
预览
Supports
Markdown
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录