修复非管理员角色无法注销的bug。

This commit is contained in:
tengge1 2019-11-18 21:20:44 +08:00
parent 52aa5acf8a
commit 82b4455e24
3 changed files with 4 additions and 3 deletions

View File

@ -62,7 +62,7 @@ namespace ShadowEditor.Server.Base
return;
}
var loginAttribute = attributes.Find(n => n.Authority == "Login"); // 具有Login权限的接口所有登录用户都能使用
var loginAttribute = attributes.Find(n => n.Authority == "LOGIN"); // 具有Login权限的接口所有登录用户都能使用
if (loginAttribute != null)
{

View File

@ -15,7 +15,7 @@
<add key="mongo_dbName" value="ShadowEditor" />
<!-- 是否开启权限管理true: 开启, false: 关闭 -->
<add key="EnableAuthority" value="false" />
<add key="EnableAuthority" value="true" />
<!-- 登录时长设置,分钟,只允许整数。 -->
<add key="Expires" value="120" />

View File

@ -28,6 +28,7 @@ class AnimationPanel extends React.Component {
render() {
const { className, style } = this.props;
const { data, categoryData, name, categories } = this.state;
const { enableAuthority, authorities } = app.server;
let list = data;
@ -61,7 +62,7 @@ class AnimationPanel extends React.Component {
<SearchField
data={categoryData}
placeholder={_t('Search Content')}
showAddButton
showAddButton={!enableAuthority || authorities.includes('ADD_ANIMATION')}
showFilterButton
onAdd={this.handleAdd}
onInput={this.handleSearch.bind(this)}