Skip to content
This repository has been archived by the owner on Apr 3, 2022. It is now read-only.

Commit

Permalink
[REPEKA-1068] Fix always possible cloning of top level resources
Browse files Browse the repository at this point in the history
Change-Id: I4272ce72b58a943563145001141f1c819c721965
  • Loading branch information
fracz committed Jul 3, 2019
1 parent 09c821b commit 2fd24d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/AdminPanel/src/resources/details/resource-details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ export class ResourceDetails implements RoutableComponentActivate {

@computedFrom('parentResource', 'resource')
get isCloneAllowed(): boolean {
return this.resource.kind.allowedToClone
&& (this.parentResource && this.isReproductor.toView(this.parentResource))
|| (!this.parentResource && this.hasRole.toView('ADMIN', this.resource.resourceClass));
return this.resource.kind.allowedToClone &&
((this.parentResource && this.isReproductor.toView(this.parentResource))
|| (!this.parentResource && this.hasRole.toView('ADMIN', this.resource.resourceClass)));
}

cloneResource(cloneTimes: number): Promise<any> {
Expand Down

0 comments on commit 2fd24d9

Please sign in to comment.