1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-01 03:25:25 +02:00

Merge code between editions

This commit is contained in:
Harvey Kandola 2018-11-07 15:56:05 +00:00
parent d1b803b246
commit 6a9ad7f540
20 changed files with 365 additions and 110 deletions

View file

@ -41,10 +41,23 @@ export default Service.extend({
}
},
// Returns product subscription.
getSubscription() {
if(this.get('sessionService.isAdmin')) {
return this.get('ajax').request(`subscription`, {
method: 'GET',
dataType: 'JSON'
}).then((response) => {
return response;
});
}
},
// Returns product license.
getLicense() {
if(this.get('sessionService.isGlobalAdmin')) {
return this.get('ajax').request(`global/license`, {
if(this.get('sessionService.isAdmin')) {
return this.get('ajax').request(`license`, {
method: 'GET',
dataType: "text"
}).then((response) => {
@ -53,10 +66,10 @@ export default Service.extend({
}
},
// Saves product license.
saveLicense(license) {
if(this.get('sessionService.isGlobalAdmin')) {
return this.get('ajax').request(`global/license`, {
// Saves product subscription data.
setLicense(license) {
if(this.get('sessionService.isAdmin')) {
return this.get('ajax').request(`license`, {
method: 'PUT',
dataType: 'text',
data: license