Skip to content

Commit

Permalink
Merge pull request #237 from Vafilor/fix/onepanelio.core.825.permissions
Browse files Browse the repository at this point in the history
fix: incorrect permissions requested for workflow create
  • Loading branch information
rushtehrani authored Jan 7, 2021
2 parents 1c5e7e3 + daa2a86 commit 50a303b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/app/auth/models.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export interface AvailablePermissions {
create?: boolean,
get?: boolean,
watch?: boolean
list?: boolean
delete?: boolean,
update?: boolean,
create?: boolean;
get?: boolean;
watch?: boolean;
list?: boolean;
delete?: boolean;
update?: boolean;
}

export class Permissions {
Expand Down
8 changes: 1 addition & 7 deletions src/app/workflow/workflow.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,7 @@ export class WorkflowComponent implements OnInit {

private checkPermissions(namespace: string) {
this.permissionService
.getWorkflowPermissions(namespace, '', 'list')
.subscribe(res => {
this.workflowPermissions = res;
});

this.permissionService
.getWorkspacePermissions(namespace, '', 'create')
.getWorkflowPermissions(namespace, '', 'create', 'list')
.subscribe(res => {
this.workflowPermissions = res;
});
Expand Down

0 comments on commit 50a303b

Please sign in to comment.