Skip to content

Commit

Permalink
[Backport release-1.6] Fix: enhance the permissions (#632)
Browse files Browse the repository at this point in the history
* Fix: disable the Input AutoComplete

Signed-off-by: barnettZQG <[email protected]>
(cherry picked from commit de9853c)

* Fix: enhance the permissions

Signed-off-by: barnettZQG <[email protected]>
(cherry picked from commit 26293bd)

* Fix: change the package version

Signed-off-by: barnettZQG <[email protected]>
(cherry picked from commit 3195253)

Co-authored-by: barnettZQG <[email protected]>
  • Loading branch information
github-actions[bot] and barnettZQG authored Nov 1, 2022
1 parent e4d73e1 commit bd3f768
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "valaux",
"version": "1.5.0",
"version": "1.6.0",
"private": true,
"scripts": {
"start": "node scripts/start.js",
Expand Down Expand Up @@ -149,4 +149,4 @@
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "5.1.4"
}
}
}
2 changes: 2 additions & 0 deletions src/components/UISchema/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,7 @@ class UISchema extends Component<Props, State> {
>
<Input
disabled={disableEdit}
autoComplete="off"
{...init(param.jsonKey, {
initValue: initValue,
rules: convertRule(param.validate),
Expand All @@ -443,6 +444,7 @@ class UISchema extends Component<Props, State> {
<Input
disabled={disableEdit}
htmlType="password"
autoComplete="off"
{...init(param.jsonKey, {
initValue: initValue,
rules: convertRule(param.validate),
Expand Down
2 changes: 1 addition & 1 deletion src/layout/LeftMenu/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function getLeftSlider(pathname) {
link: '/pipelines',
iconType: 'Directory-tree',
navName: 'Pipelines',
permission: { resource: 'project:?/pipelines:*', action: 'list' },
permission: { resource: 'project:?/pipeline:*', action: 'list' },
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,6 @@ class ConfigDistributionPage extends Component<Props, State> {
>
<Icon type="refresh" />
</Button>
{/* <Permission
request={{ resource: `project/config:*`, action: 'create' }}
project={projectName}
>
<Button className="card-button-wrapper">
<Translation>Add</Translation>
</Button>
</Permission> */}
</section>
<section className="card-content-table">
<Table
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ProjectSummary/components/Configs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class Configs extends Component<Props, State> {
<Icon type="refresh" />
</Button>
<Permission
request={{ resource: `project/config:*`, action: 'create' }}
request={{ resource: `project:${projectName}/config:*`, action: 'create' }}
project={projectName}
>
<Button
Expand Down
7 changes: 6 additions & 1 deletion src/pages/ProjectSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,14 @@ class Summary extends Component<Props, State> {
<Targets projectName={params.projectName} />
<Permission
project={params.projectName}
request={{ resource: `project:${params.projectName}/configs:*`, action: 'list' }}
request={{ resource: `project:${params.projectName}/config:*`, action: 'list' }}
>
<Configs projectName={params.projectName} />
</Permission>
<Permission
project={params.projectName}
request={{ resource: `project:${params.projectName}/config:*`, action: 'distribute' }}
>
<ConfigDistributionPage projectName={params.projectName} />
</Permission>
</div>
Expand Down

0 comments on commit bd3f768

Please sign in to comment.