Merge pull request #2339 from loadchange/develop_1.2.0

fix: namespace value
This commit is contained in:
Peter Zhu 2020-02-04 11:38:15 +08:00 committed by GitHub
commit 44cd2a8603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 7 deletions

View File

@ -90,7 +90,7 @@ class NewPermissions extends React.Component {
style={{ width: '100%' }}
>
{namespaces.map(({ namespace, namespaceShowName }) => (
<Option value={namespace}>
<Option value={`${namespace}:*:*`}>
{namespaceShowName} {namespace ? `(${namespace})` : ''}
</Option>
))}

View File

@ -79,7 +79,7 @@ class RolesManagement extends React.Component {
title={locale.operation}
dataIndex="role"
cell={(value, index, record) => {
if (value === 'GLOBAL_ADMIN') {
if (value === 'ROLE_ADMIN') {
return null;
}
return (

View File

@ -107,9 +107,7 @@ const getPermissions = params => dispatch =>
* @param {*} param0
*/
const createPermission = ([role, resource, action]) =>
request
.post('v1/auth/permissions', { role, resource: `${resource}:*:*`, action })
.then(res => successMsg(res));
request.post('v1/auth/permissions', { role, resource, action }).then(res => successMsg(res));
/**
* 删除权限

File diff suppressed because one or more lines are too long