[master]: Remove sandbox button from beta.
This commit is contained in:
parent
ff86fb98f1
commit
6a0b9f9c06
|
@ -49,7 +49,7 @@ import {UserManagementService} from "../openaireLibrary/services/user-management
|
|||
<a *ngIf="isManager" [routerLink]="adminLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
Manage
|
||||
</a>
|
||||
<a *ngIf="isMember" [href]="sandboxLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
<a *ngIf="sandboxLink" [href]="sandboxLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
Sandbox
|
||||
</a>
|
||||
</div>
|
||||
|
@ -131,6 +131,10 @@ export class NationalComponent extends StakeholderBaseComponent implements OnIni
|
|||
}
|
||||
|
||||
get sandboxLink() {
|
||||
return beta.domain + '/national/';
|
||||
if(this.properties.environment !== 'beta' && this.isMember) {
|
||||
return beta.domain + '/national/';
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ import {properties as beta} from "../../environments/environment.beta";
|
|||
<a *ngIf="isManager" [routerLink]="adminLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
Manage
|
||||
</a>
|
||||
<a *ngIf="isMember" [href]="sandboxLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
<a *ngIf="sandboxLink" [href]="sandboxLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
Sandbox
|
||||
</a>
|
||||
<a *ngIf="isProvideManager && provideLink" [href]="provideLink" target="_blank" class="uk-button uk-flex uk-flex-middle">
|
||||
|
@ -199,7 +199,11 @@ export class RepositoryComponent extends StakeholderBaseComponent implements OnI
|
|||
}
|
||||
|
||||
get sandboxLink() {
|
||||
return beta.domain + '/repository/' + this.stakeholder.alias;
|
||||
if(this.properties.environment !== 'beta' && this.isMember) {
|
||||
return beta.domain + '/repository/' + this.stakeholder.alias;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
get provideLink() {
|
||||
|
|
|
@ -63,7 +63,7 @@ import {properties as beta} from "../../environments/environment.beta";
|
|||
<a *ngIf="isManager" [routerLink]="adminLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
Manage
|
||||
</a>
|
||||
<a *ngIf="isMember" [href]="sandboxLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
<a *ngIf="sandboxLink" [href]="sandboxLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
Sandbox
|
||||
</a>
|
||||
</div>
|
||||
|
@ -164,6 +164,10 @@ export class RfoComponent extends StakeholderBaseComponent implements OnInit {
|
|||
}
|
||||
|
||||
get sandboxLink() {
|
||||
return beta.domain + '/rfo/' + this.stakeholder.alias;
|
||||
if(this.properties.environment !== 'beta' && this.isMember) {
|
||||
return beta.domain + '/rfo/' + this.stakeholder.alias;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ import {UserManagementService} from "../openaireLibrary/services/user-management
|
|||
<a *ngIf="isManager" [routerLink]="adminLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
Manage
|
||||
</a>
|
||||
<a *ngIf="isMember" [href]="sandboxLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
<a *ngIf="sandboxLink" [href]="sandboxLink" target="_blank" class="uk-button uk-flex uk-flex-middle uk-margin-small-right">
|
||||
Sandbox
|
||||
</a>
|
||||
</div>
|
||||
|
@ -165,7 +165,11 @@ export class RpoComponent extends StakeholderBaseComponent implements OnInit {
|
|||
}
|
||||
|
||||
get sandboxLink() {
|
||||
return beta.domain + '/rpo/' + this.stakeholder.alias;
|
||||
if(this.properties.environment !== 'beta' && this.isMember) {
|
||||
return beta.domain + '/rpo/' + this.stakeholder.alias;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ export class SandboxGuard {
|
|||
}
|
||||
|
||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
let sandbox = properties.environment === 'development';
|
||||
let sandbox = properties.environment === 'beta';
|
||||
if (childRoute.data['researcher'] && childRoute.params.stakeholder && sandbox) {
|
||||
return this.checkResearcher(state.url, childRoute.params.stakeholder);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue