mirror of
https://github.com/documize/community.git
synced 2025-07-30 10:39:44 +02:00
Make Trello config dependent on user permission
This commit is contained in:
parent
9987d29b7b
commit
58fc03f4c1
3 changed files with 689 additions and 679 deletions
|
@ -109,6 +109,9 @@ func (h *Handler) GetInstanceSetting(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
key := request.Query(r, "key")
|
key := request.Query(r, "key")
|
||||||
setting, _ := h.Store.Setting.GetUser(orgID, "", key, "")
|
setting, _ := h.Store.Setting.GetUser(orgID, "", key, "")
|
||||||
|
if len(setting) == 0 {
|
||||||
|
setting = "{}"
|
||||||
|
}
|
||||||
|
|
||||||
response.WriteJSON(w, setting)
|
response.WriteJSON(w, setting)
|
||||||
}
|
}
|
||||||
|
|
1350
embed/bindata.go
1350
embed/bindata.go
File diff suppressed because one or more lines are too long
|
@ -28,10 +28,17 @@ export default Route.extend(AuthenticatedRouteMixin, {
|
||||||
model() {
|
model() {
|
||||||
let orgId = this.get("appMeta.orgId");
|
let orgId = this.get("appMeta.orgId");
|
||||||
|
|
||||||
return RSVP.hash({
|
if (this.get("session.isGlobalAdmin")) {
|
||||||
jira: this.get('orgService').getOrgSetting(orgId, 'jira'),
|
return RSVP.hash({
|
||||||
trello: this.get('orgService').getGlobalSetting('SECTION-TRELLO')
|
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() {
|
activate() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue