mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Renames the "Sync Members From LDAP" column to "Sync Members From Auth Provider" so the setting and feature apply to any authentication provider (LDAP, OAuth2/OIDC, SAML, etc.), not just LDAP. Renames the field/method/i18n key from *SyncMembersFromLdap / sync-members-from-ldap to *SyncMembersFromAuth / sync-members-from-auth across schema, publications, admin methods and the admin UI, and generalizes the translation string and code comments. The other two columns (Shared Templates, Propagate Members To Boards) were already auth-agnostic. Thanks to xet7. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
112 lines
2.5 KiB
JavaScript
112 lines
2.5 KiB
JavaScript
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,
|
|
},
|
|
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;
|