1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 23:59:47 +02:00

Make Trello config dependent on user permission

This commit is contained in:
HarveyKandola 2018-08-10 15:16:49 +01:00
parent 9987d29b7b
commit 58fc03f4c1
3 changed files with 689 additions and 679 deletions

View file

@ -28,10 +28,17 @@ export default Route.extend(AuthenticatedRouteMixin, {
model() {
let orgId = this.get("appMeta.orgId");
return RSVP.hash({
jira: this.get('orgService').getOrgSetting(orgId, 'jira'),
trello: this.get('orgService').getGlobalSetting('SECTION-TRELLO')
});
if (this.get("session.isGlobalAdmin")) {
return RSVP.hash({
jira: this.get('orgService').getOrgSetting(orgId, 'jira'),
trello: this.get('orgService').getGlobalSetting('SECTION-TRELLO')
});
} else {
return RSVP.hash({
jira: this.get('orgService').getOrgSetting(orgId, 'jira'),
trello: { appKey: '' }
});
}
},
activate() {