mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
修复非管理员角色无法注销的bug。
This commit is contained in:
parent
52aa5acf8a
commit
82b4455e24
@ -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)
|
||||
{
|
||||
|
||||
@ -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" />
|
||||
|
||||
@ -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)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user