aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/User.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/models/User.js')
-rw-r--r--src/models/User.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/models/User.js b/src/models/User.js
index 2e5df4795..2eb48394f 100644
--- a/src/models/User.js
+++ b/src/models/User.js
@@ -1,4 +1,4 @@
1import { observable } from 'mobx'; 1import { observable, computed } from 'mobx';
2 2
3export default class User { 3export default class User {
4 id = null; 4 id = null;
@@ -15,6 +15,17 @@ export default class User {
15 @observable donor = {}; 15 @observable donor = {};
16 @observable isDonor = false; 16 @observable isDonor = false;
17 @observable isMiner = false; 17 @observable isMiner = false;
18 @observable isSSO = false;
19 @observable clientSettings = {
20 userCanManageServices: true,
21 };
22 @observable company = {
23 name: 'Happle Apps',
24 contact: {
25 technical: 'technical@company.com',
26 default: 'default@company.com',
27 },
28 };
18 29
19 constructor(data) { 30 constructor(data) {
20 if (!data.id) { 31 if (!data.id) {
@@ -33,5 +44,13 @@ export default class User {
33 this.isDonor = data.isDonor || this.isDonor; 44 this.isDonor = data.isDonor || this.isDonor;
34 this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner; 45 this.isSubscriptionOwner = data.isSubscriptionOwner || this.isSubscriptionOwner;
35 this.isMiner = data.isMiner || this.isMiner; 46 this.isMiner = data.isMiner || this.isMiner;
47 this.isSSO = data.isSSO || this.isSSO;
48 this.clientSettings = data.clientSettings || this.clientSettings;
49 this.company = data.company || this.company;
50 }
51
52 @computed get isEnterprise() {
53 // return false
54 return this.company.name !== undefined;
36 } 55 }
37} 56}