[Monitor Dashboard|Trunk]

-set SEO titles also for private view
- add check in getTypesByUserRoles


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@59771 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Argiro Kokogiannaki 2020-11-04 16:04:29 +00:00
parent a75fe03511
commit 5f6c0884b5
2 changed files with 12 additions and 12 deletions

View File

@ -129,18 +129,18 @@ export class MonitorComponent implements OnInit, OnDestroy {
,filterOperator: "or", valueIsExact: true, filterType: "checkbox", radioValue:""});
}
this.initializeFilters();
this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'");
var description = "Monitor Dashboard | " + this.stakeholder.name;
var title = "Monitor Dashboard | " + this.stakeholder.name;
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'");
this._title.setTitle(title);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.piwiksub = this._piwikService.trackView(this.properties, title, this.properties.piwikSiteId).subscribe();
}
if(this.isPublicOrIsMember(stakeholder.visibility)) {
this.seoService.createLinkForCanonicalURL(url, false);
this._meta.updateTag({content: url}, "property='og:url'");
var description = "Monitor Dashboard | " + this.stakeholder.name;
var title = "Monitor Dashboard | " + this.stakeholder.name;
this._meta.updateTag({content: description}, "name='description'");
this._meta.updateTag({content: description}, "property='og:description'");
this._meta.updateTag({content: title}, "property='og:title'");
this._title.setTitle(title);
if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) {
this.piwiksub = this._piwikService.trackView(this.properties, title, this.properties.piwikSiteId).subscribe();
}
//this.getDivContents();
this.getPageContents();
this.status = this.errorCodes.DONE;

View File

@ -27,7 +27,7 @@ export class StakeholderUtils {
getTypesByUserRoles(user, id:string = null):Option[]{
let types = [];
for(let type of this.types){
if(Session.isCurator(type.value, user)|| Session.isPortalAdministrator(user)|| Session.isManager(type.value, id, user)){
if(Session.isCurator(type.value, user)|| Session.isPortalAdministrator(user)|| (id && Session.isManager(type.value, id, user))){
types.push(type);
}
}