Skip to content
Commits on Source (16)
......@@ -39,7 +39,7 @@ stages:
- !reference [.rules-map, on-dev]
- !reference [.rules-map, not-on-semantic-release-commit]
- !reference [.rules-map, on-branch]
image: hub.eole.education/proxyhub/geoffreybooth/meteor-base:2.11.0
image: hub.eole.education/proxyhub/geoffreybooth/meteor-base:2.12
before_script:
- cd app
cache:
......
# The tag here should match the Meteor version of your app, per .meteor/release
FROM hub.eole.education/proxyhub/geoffreybooth/meteor-base:2.11.0
FROM hub.eole.education/proxyhub/geoffreybooth/meteor-base:2.12
# Copy app package.json and package-lock.json into container
COPY ./app/package*.json $APP_SOURCE_FOLDER/
......
......@@ -6,16 +6,16 @@
meteor-base@1.5.1 # Packages every Meteor app needs to have
mobile-experience@1.1.0 # Packages for a great mobile UX
mongo@1.16.5 # The database Meteor supports right now
mongo@1.16.6 # The database Meteor supports right now
reactive-var@1.0.12 # Reactive variable for tracker
standard-minifier-css@1.9.0 # CSS minifier run for production mode
standard-minifier-css@1.9.2 # CSS minifier run for production mode
standard-minifier-js@2.8.1 # JS minifier run for production mode
es5-shim@4.8.0 # ECMAScript 5 compatibility for older browsers
ecmascript@0.16.6 # Enable ECMAScript2015+ syntax in app code
ecmascript@0.16.7 # Enable ECMAScript2015+ syntax in app code
typescript@4.9.4 # Enable TypeScript syntax in .ts and .tsx modules
shell-server@0.5.0 # Server-side component of the `meteor shell` command
hot-module-replacement@0.5.2 # Update client in development without reloading the page
hot-module-replacement@0.5.3 # Update client in development without reloading the page
static-html@1.3.2 # Define static page content in .html files
react-meteor-data # React higher-order component for reactively tracking Meteor data
......@@ -36,7 +36,7 @@ random@1.2.1
service-configuration@1.3.1
matb33:collection-hooks
email@2.2.4
email@2.2.5
check@1.3.2
eoleteam:accounts-keycloak
mexar:mdt
accounts-base@2.2.7
accounts-base@2.2.8
accounts-oauth@1.4.2
accounts-password@2.3.4
aldeed:collection2@3.5.0
aldeed:schema-index@3.0.0
allow-deny@1.1.1
autoupdate@1.8.0
babel-compiler@7.10.3
babel-compiler@7.10.4
babel-runtime@1.5.1
base64@1.0.12
binary-heap@1.0.11
......@@ -13,30 +13,30 @@ blaze-tools@1.1.3
boilerplate-generator@1.7.1
caching-compiler@1.2.2
caching-html-compiler@1.2.1
callback-hook@1.5.0
callback-hook@1.5.1
check@1.3.2
dburles:collection-helpers@1.1.0
dburles:factory@1.3.0
dburles:factory@1.5.0
ddp@1.4.1
ddp-client@2.6.1
ddp-common@1.4.0
ddp-rate-limiter@1.1.1
ddp-server@2.6.0
ddp-rate-limiter@1.2.0
ddp-server@2.6.1
diff-sequence@1.1.2
dynamic-import@0.7.2
ecmascript@0.16.6
ecmascript-runtime@0.8.0
dynamic-import@0.7.3
ecmascript@0.16.7
ecmascript-runtime@0.8.1
ecmascript-runtime-client@0.12.1
ecmascript-runtime-server@0.11.0
ejson@1.1.3
email@2.2.4
email@2.2.5
eoleteam:accounts-keycloak@2.1.0
eoleteam:keycloak-oauth@2.2.0
es5-shim@4.8.0
fetch@0.1.3
geojson-utils@1.0.11
hot-code-push@1.0.4
hot-module-replacement@0.5.2
hot-module-replacement@0.5.3
html-tools@1.1.3
htmljs@1.1.1
http@2.0.0
......@@ -47,37 +47,37 @@ johanbrook:publication-collector@1.1.0
launch-screen@1.3.0
localstorage@1.2.0
logging@1.3.2
matb33:collection-hooks@1.2.1
mdg:validated-method@1.2.0
meteor@1.11.1
matb33:collection-hooks@1.2.2
mdg:validated-method@1.3.0
meteor@1.11.2
meteor-base@1.5.1
meteortesting:browser-tests@1.5.1
meteortesting:mocha@2.1.0
meteortesting:mocha-core@8.1.2
mexar:mdt@0.2.2
minifier-css@1.6.2
minifier-css@1.6.4
minifier-js@2.7.5
minimongo@1.9.2
minimongo@1.9.3
mobile-experience@1.1.0
mobile-status-bar@1.1.0
modern-browsers@0.1.9
modules@0.19.0
modules-runtime@0.13.1
modules-runtime-hot@0.14.1
mongo@1.16.5
modules-runtime-hot@0.14.2
mongo@1.16.6
mongo-decimal@0.1.3
mongo-dev-server@1.1.0
mongo-id@1.0.8
npm-mongo@4.14.0
npm-mongo@4.16.0
oauth@2.2.0
oauth2@1.3.2
ordered-dict@1.1.0
promise@0.12.2
raix:eventemitter@1.0.0
random@1.2.1
rate-limit@1.0.9
react-fast-refresh@0.2.6
react-meteor-data@2.6.3
rate-limit@1.1.1
react-fast-refresh@0.2.7
react-meteor-data@2.7.2
reactive-var@1.0.12
reload@1.3.1
retry@1.1.0
......@@ -85,18 +85,18 @@ routepolicy@1.1.1
service-configuration@1.3.1
sha@1.0.9
shell-server@0.5.0
socket-stream-client@0.5.0
socket-stream-client@0.5.1
spacebars-compiler@1.3.1
standard-minifier-css@1.9.0
standard-minifier-css@1.9.2
standard-minifier-js@2.8.1
static-html@1.3.2
templating-tools@1.2.2
tmeasday:check-npm-versions@1.0.2
tracker@1.3.1
tracker@1.3.2
typescript@4.9.4
underscore@1.0.12
underscore@1.0.13
universe:i18n@1.32.6
url@1.3.2
webapp@1.13.4
webapp@1.13.5
webapp-hashing@1.1.1
zodern:types@1.0.9
......@@ -37,14 +37,19 @@ const sendEmail = (event, userId) => {
});
return event.guests.forEach((guest) => {
return Email.send({
to: guest,
from: Meteor.settings.private.smtp.fromEmail,
subject: `Laboite - Agenda - Votre rdv du ${moment(event.start).format('L')}`,
icalEvent: cal.toString(),
inReplyTo: Meteor.settings.private.smtp.toEmail,
html,
});
try {
return Email.send({
to: guest,
from: Meteor.settings.private.smtp.fromEmail,
subject: `Laboite - Agenda - Votre rdv du ${moment(event.start).format('L')}`,
icalEvent: cal.toString(),
inReplyTo: Meteor.settings.private.smtp.toEmail,
html,
});
} catch (error) {
console.log("Can't send email to : ", guest);
return null;
}
});
};
......
......@@ -3,18 +3,19 @@ import ROUTES from '../../../ui/layouts/routes';
const sendnotif = ({ groups, participants, title, eventId, content }) => {
const [apiKey] = Meteor.settings.private.apiKeys;
axios.defaults.baseURL = Meteor.settings.public.laboiteURL;
axios.defaults.baseURL = Meteor.settings.public.laboiteUrl;
axios.defaults.headers.common['X-API-KEY'] = apiKey;
axios.defaults.headers.post['Content-Type'] = 'application/json';
try {
groups.forEach(async ({ _id }) => {
await axios.post('/api/notifications', {
groupId: _id,
axios
.post('/api/notifications', {
groupsId: groups.map((g) => g._id),
content,
title,
link: `${Meteor.absoluteUrl()}${ROUTES.EVENT_MAKE(eventId).replace('/', '')}`,
});
});
})
.then(() => console.log(`Send multi groups notif ok for event: ${eventId}`))
.catch((err) => console.log(err));
participants.forEach(async ({ _id, groupId }) => {
if (!groupId) {
await axios.post('/api/notifications', {
......
......@@ -6,31 +6,29 @@ import logServer from '../../../api/utils/functions';
// required: loads accounts customization before initial users creation
if (Meteor.settings.keycloak) {
if (Meteor.settings.public.enableKeycloak === true) {
if (Meteor.settings.public.laboiteUrl) {
Accounts.onCreateUser(() => {
// Users should not be created by apps-agenda,
// Redirect user to laboite if not found
throw new Meteor.Error('api.users.createUser', 'User creation is disabled in Agenda');
});
}
Accounts.config({
forbidClientAccountCreation: !Meteor.isTest,
if (Meteor.settings.public.laboiteUrl) {
Accounts.onCreateUser(() => {
// Users should not be created by apps-agenda,
// Redirect user to laboite if not found
throw new Meteor.Error('api.users.createUser', 'User creation is disabled in Agenda');
});
ServiceConfiguration.configurations.upsert(
{ service: 'keycloak' },
{
$set: {
loginStyle: 'redirect',
serverUrl: Meteor.settings.public.keycloakUrl,
realm: Meteor.settings.public.keycloakRealm,
clientId: Meteor.settings.keycloak.client,
realmPublicKey: Meteor.settings.keycloak.pubkey,
bearerOnly: false,
},
},
);
}
Accounts.config({
forbidClientAccountCreation: !Meteor.isTest,
});
ServiceConfiguration.configurations.upsert(
{ service: 'keycloak' },
{
$set: {
loginStyle: 'redirect',
serverUrl: Meteor.settings.public.keycloakUrl,
realm: Meteor.settings.public.keycloakRealm,
clientId: Meteor.settings.keycloak.client,
realmPublicKey: Meteor.settings.keycloak.pubkey,
bearerOnly: false,
},
},
);
} else {
logServer('No Keycloak configuration. Please invoke meteor with a settings file.');
}
......@@ -76,16 +76,12 @@ const MainMenu = ({ user = {} }) => {
};
const onLogout = () => {
if (Meteor.settings.public.enableKeycloak) {
const logoutType = user.logoutType || 'ask';
if (logoutType === 'ask') {
setOpenLogout(true);
} else if (logoutType === 'global') {
keycloakLogout();
} else localLogout();
} else {
localLogout();
}
const logoutType = user.logoutType || 'ask';
if (logoutType === 'ask') {
setOpenLogout(true);
} else if (logoutType === 'global') {
keycloakLogout();
} else localLogout();
};
const handleCopyCaldavUrl = () => {
......
This diff is collapsed.
{
"name": "agenda3",
"version": "3.9.0",
"version": "3.10.0",
"license": "EUPL-1.2",
"description": "Online diary",
"author": "EOLE/PCLL <team@eole.education> - DINUM",
......@@ -15,7 +15,7 @@
"visualize": "meteor --production --extra-packages bundle-visualizer --settings ../config/settings.development.json"
},
"dependencies": {
"@babel/runtime": "^7.21.0",
"@babel/runtime": "^7.21.5",
"@fullcalendar/core": "^5.11.4",
"@fullcalendar/daygrid": "^5.11.4",
"@fullcalendar/interaction": "^5.11.4",
......@@ -34,7 +34,7 @@
"faker": "^5.5.3",
"fullcalendar": "^5.11.4",
"ical-generator": "^2.2.0",
"material-icons": "^1.13.2",
"material-icons": "^1.13.6",
"meteor-node-stubs": "^1.2.5",
"moment": "^2.29.4",
"node-ical": "^0.13.0",
......@@ -70,6 +70,9 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-standard": "^4.1.0",
"prettier": "^2.8.4"
"prettier": "^2.8.8"
},
"overrides": {
"semver": "^7.5.2"
}
}
......@@ -4,17 +4,16 @@ Copier `settings-development.json.sample` dans `settings-development.json` et me
## public:
| Key | Type | Default value | Description |
| ----------------------------------------- | ------- | --------------------------------------------- | ---------------------------- |
| enableKeycloak | boolean | false | Si true, keycloak est activé |
| keycloakUrl | string | "" | Keycloak URL |
| keycloakRealm | string | "" | Keycloak Realm |
| laboiteBlogURL | string | "" | Laboite Blog URL |
| caldavUrl | string | "" | url caldav |
| packages | object | {} | |
| packages.dynamic-import | object | {} | |
| packages.dynamic-import.link | string | "https://github.com/meteor/meteor/pull/11105" | |
| packages.dynamic-import.useLocationOrigin | boolean | true | |
| Key | Type | Default value | Description |
| ----------------------------------------- | ------- | --------------------------------------------- | ---------------- |
| keycloakUrl | string | "" | Keycloak URL |
| keycloakRealm | string | "" | Keycloak Realm |
| laboiteBlogURL | string | "" | Laboite Blog URL |
| caldavUrl | string | "" | url caldav |
| packages | object | {} | |
| packages.dynamic-import | object | {} | |
| packages.dynamic-import.link | string | "https://github.com/meteor/meteor/pull/11105" | |
| packages.dynamic-import.useLocationOrigin | boolean | true | |
## keycloak:
......
......@@ -4,27 +4,23 @@ Copy `settings-development.json.sample` to `settings-development.json` and updat
## public:
| Key | Type | Default value | Description |
| ----------------------------------------- | ------- | --------------------------------------------- | ---------------------------- |
| enableKeycloak | boolean | false | If true, keycloak is enabled |
| keycloakUrl | string | "" | Keycloak URL |
| keycloakRealm | string | "" | Keycloak Realm |
| laboiteBlogURL | string | "" | Laboite Blog URL |
| caldavUrl | string | "" | Caldav url |
| packages | object | {} | |
| packages.dynamic-import | object | {} | |
| packages.dynamic-import.link | string | "https://github.com/meteor/meteor/pull/11105" | |
| packages.dynamic-import.useLocationOrigin | boolean | true | |
| Key | Type | Default value | Description |
| ----------------------------------------- | ------- | --------------------------------------------- | ---------------- |
| keycloakUrl | string | "" | Keycloak URL |
| keycloakRealm | string | "" | Keycloak Realm |
| laboiteBlogURL | string | "" | Laboite Blog URL |
| caldavUrl | string | "" | Caldav url |
| packages | object | {} | |
| packages.dynamic-import | object | {} | |
| packages.dynamic-import.link | string | "https://github.com/meteor/meteor/pull/11105" | |
| packages.dynamic-import.useLocationOrigin | boolean | true | |
## keycloak:
| Key | Type | Default value | Description |
| ------------- | -------- | ------------- | ----------------------- |
| pubkey | string | "" | Keycloak public key |
| client | string | "sso" | Keycloak client type |
| adminEmails | [string] | [] | Keycloak admin emails |
| adminUser | string | "" | Keycloak admin user |
| adminPassword | string | "" | Keycloak admin password |
| Key | Type | Default value | Description |
| ------ | ------ | ------------- | -------------------- |
| pubkey | string | "" | Keycloak public key |
| client | string | "sso" | Keycloak client type |
## private:
......
{
"public": {
"enableKeycloak": true,
"keycloakUrl": "",
"keycloakRealm": "",
"laboiteUrl": "",
......
# Changelog
## [3.10.0](https://gitlab.mim-libre.fr/alphabet/agenda/compare/release/3.9.0...release/3.10.0) (2023-08-24)
### Features
* **meteor:** change meteor base version ([4ad997d](https://gitlab.mim-libre.fr/alphabet/agenda/commit/4ad997d2939abf794d74f3eaf25c235aca615f70))
### Bug Fixes
* **emails:** can now create event when guest hasn't a valid mail ([8bf7f5e](https://gitlab.mim-libre.fr/alphabet/agenda/commit/8bf7f5ebfc2d2988842991e7e74056e9ea3d6fbc))
* **notification:** modify call for multigroups notification ([07ab6c8](https://gitlab.mim-libre.fr/alphabet/agenda/commit/07ab6c8b8b845de4fb59c8186f3d87377e7a0cfa))
* **settings:** remove enableKeycloak setting (Keycloak is mandatory) ([7c7ad53](https://gitlab.mim-libre.fr/alphabet/agenda/commit/7c7ad53aee4e497452de39486d8add88abbc1e04))
### Build System
* **meteor:** update meteor to 2.12 and meteor libs ([79a4f08](https://gitlab.mim-libre.fr/alphabet/agenda/commit/79a4f081821f78f71c4aba2840f109a1e4901f7a))
## [3.9.0](https://gitlab.mim-libre.fr/alphabet/agenda/compare/release/3.8.0...release/3.9.0) (2023-04-18)
......