Repository navigation
Expand file tree
/
Copy pathorg.js
More file actions
203 lines (200 loc) · 5.12 KB
/
Copy pathorg.js
File metadata and controls
203 lines (200 loc) · 5.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
import { Mongo } from 'meteor/mongo';
import { ReactiveCache } from '/imports/reactiveCache';
const { SimpleSchema } = require('/imports/simpleSchema');
const Org = new Mongo.Collection('org');
/**
* A Organization in WeKan. A Enterprise in Trello.
*/
Org.attachSchema(
new SimpleSchema({
orgDisplayName: {
/**
* the name to display for the organization
*/
type: String,
optional: true,
},
orgDesc: {
/**
* the description the organization
*/
type: String,
optional: true,
max: 190,
},
orgShortName: {
/**
* short name of the organization
*/
type: String,
optional: true,
max: 255,
},
orgAutoAddUsersWithDomainName: {
/**
* automatically add users with domain name
*/
type: String,
optional: true,
max: 255,
},
orgWebsite: {
/**
* website of the organization
*/
type: String,
optional: true,
max: 255,
},
orgIsActive: {
/**
* status of the organization
*/
type: Boolean,
optional: true,
},
orgSharedTemplates: {
/**
* #5850: members may drag personal Template Boards onto this org to share
* (per-org form of "Shared Templates for Organizations"). Off by default.
*/
type: Boolean,
optional: true,
},
orgPropagateMembersToBoards: {
/**
* #4737: add this org's members to the boards that list this org. Off by default.
*/
type: Boolean,
optional: true,
},
orgSyncMembersFromAuth: {
/**
* #4737: this org's membership is maintained by the authentication
* provider's group/membership sync (LDAP, OAuth2/OIDC, SAML, etc.). Off by default.
*/
type: Boolean,
optional: true,
},
orgDomains: {
/**
* Multitenancy option D (docs/Design/Multitenancy/Multitenancy.md): the
* hostname(s) this Organization is served on, free text separated by commas,
* semicolons or whitespace - e.g. "a.example.com, kanban.example.org". A
* request whose host matches one of these is that tenant's request, and the
* org's branding below replaces the instance branding for it. Empty (the
* default) means the org is not a tenant and nothing changes.
* Only read when the deployment sets MULTITENANCY=true.
*/
type: String,
optional: true,
max: 1000,
},
orgDomainsRequested: {
/**
* Hostnames this Organization's own admin asked for and a site admin has
* not yet assigned (2026-10-02: only a site admin assigns a hostname).
* Not in effect until then.
*/
type: String,
optional: true,
max: 1000,
},
orgProductName: {
/**
* Per-tenant branding. Each of these overrides the SAME-named instance
* setting of Admin Panel / Settings / Visibility for this tenant's requests,
* and an empty one leaves the instance value alone - so a tenant overrides
* only what it sets. See models/lib/tenants.js BRANDING_FIELDS.
*/
type: String,
optional: true,
max: 255,
},
orgThemeColor: {
/**
* The site theme for this Organization's hosts - the layer between WeKan's
* default theme and a user's own override (docs/Theme/Theme.md). Set in
* Admin Panel / Settings / Visibility / Change color.
*/
type: String,
optional: true,
max: 255,
},
orgThemeCustomColors: {
/**
* The custom colours of that theme, for the flat (1 colour) and clear
* (2 colours, a gradient) categories.
*/
type: Array,
optional: true,
},
'orgThemeCustomColors.$': {
type: String,
optional: true,
},
orgCustomLoginLogoImageUrl: {
type: String,
optional: true,
max: 1000,
},
orgCustomLoginLogoLinkUrl: {
type: String,
optional: true,
max: 1000,
},
orgTextBelowCustomLoginLogo: {
type: String,
optional: true,
max: 1000,
},
orgCustomTopLeftCornerLogoImageUrl: {
type: String,
optional: true,
max: 1000,
},
orgCustomTopLeftCornerLogoLinkUrl: {
type: String,
optional: true,
max: 1000,
},
orgCustomHelpLinkUrl: {
type: String,
optional: true,
max: 1000,
},
orgLegalNotice: {
type: String,
optional: true,
max: 1000,
},
createdAt: {
/**
* creation date of the organization
*/
type: Date,
// eslint-disable-next-line consistent-return
autoValue() {
if (this.isInsert) {
return new Date();
} else if (this.isUpsert) {
return { $setOnInsert: new Date() };
} else {
this.unset();
}
},
},
modifiedAt: {
type: Date,
// eslint-disable-next-line consistent-return
autoValue() {
if (this.isInsert || this.isUpsert || this.isUpdate) {
return new Date();
} else {
this.unset();
}
},
},
}),
);
export default Org;