Skip to content
This repository was archived by the owner on Nov 4, 2024. It is now read-only.

Road to the MIT #2187

Merged
merged 1 commit into from
Aug 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .docker/nginx/ssl.sh
100644 → 100755
Empty file.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ module.exports = {
es6: true
},
globals: {
'RL_COMMUNITY': true,
'RL_ES6': true
},
// http://eslint.org/docs/rules/
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:

- run: yarn install --frozen-lockfile --check-files
- run: yarn build
- run: yarn build-pro

- name: Move all assets to release folder
run: |
Expand Down
4 changes: 0 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,3 @@

1. Edit data/\_data_/\_default_/configs/application.ini
2. Set 'cache_system_data' to Off

---

If you have any questions, open an issue or email support@rainloop.net.
682 changes: 21 additions & 661 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ rl-watch-js:

rl-build:
@docker compose run --no-deps --rm node gulp all
rl-build-pro:
@docker compose run --no-deps --rm node gulp all --pro

yarn-install:
@docker compose run --no-deps --rm node yarn install
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Information about installing the product, check the [documentation page](http://

## License

**RainLoop Webmail (Community edition)** is released under
**GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (AGPL)**.
http://www.gnu.org/licenses/agpl-3.0.html
**RainLoop Webmail (Legacy edition)** is released under
**MIT License**.
https://choosealicense.com/licenses/mit/

Copyright (c) 2019 Rainloop Team
Copyright (c) 2022 Rainloop Team
40 changes: 2 additions & 38 deletions dev/App/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@ import ko from 'ko';
import progressJs from 'progressJs';

import { root } from 'Common/Links';
import { getNotification } from 'Common/Translator';
import { StorageResultType, Notification } from 'Common/Enums';
import { pInt, isNormal, isArray, inArray, isUnd } from 'Common/Utils';
import { StorageResultType } from 'Common/Enums';
import { pInt, isArray, isUnd } from 'Common/Utils';

import * as Settings from 'Storage/Settings';

import AppStore from 'Stores/Admin/App';
import CapaStore from 'Stores/Admin/Capa';
import DomainStore from 'Stores/Admin/Domain';
import PluginStore from 'Stores/Admin/Plugin';
import LicenseStore from 'Stores/Admin/License';
import PackageStore from 'Stores/Admin/Package';
import CoreStore from 'Stores/Admin/Core';
import Remote from 'Remote/Admin/Ajax';
Expand Down Expand Up @@ -150,40 +148,6 @@ class AdminApp extends AbstractApp {
});
}

/**
* @param {boolean=} force = false
*/
reloadLicensing(force = false) {
LicenseStore.licensingProcess(true);
LicenseStore.licenseError('');
Remote.licensing((result, data) => {
LicenseStore.licensingProcess(false);
if (StorageResultType.Success === result && data && data.Result && isNormal(data.Result.Expired)) {
LicenseStore.licenseValid(true);
LicenseStore.licenseExpired(pInt(data.Result.Expired));
LicenseStore.licenseError('');
LicenseStore.licensing(true);
AppStore.prem(true);
} else {
if (
data &&
data.ErrorCode &&
-1 < inArray(pInt(data.ErrorCode), [Notification.LicensingServerIsUnavailable, Notification.LicensingExpired])
) {
LicenseStore.licenseError(getNotification(pInt(data.ErrorCode)));
LicenseStore.licensing(true);
} else {
if (StorageResultType.Abort === result) {
LicenseStore.licenseError(getNotification(Notification.LicensingServerIsUnavailable));
LicenseStore.licensing(true);
} else {
LicenseStore.licensing(false);
}
}
}
}, force);
}

bootend(bootendCallback = null) {
if (progressJs) {
progressJs.end();
Expand Down
5 changes: 0 additions & 5 deletions dev/Common/Globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ $hcont

export const startMicrotime = new window.Date().getTime();

/**
* @type {boolean}
*/
export const community = RL_COMMUNITY;

/**
* @type {?}
*/
Expand Down
19 changes: 2 additions & 17 deletions dev/Screen/Admin/Settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { SocialAdminSettings } from 'Settings/Admin/Social';
import { PluginsAdminSettings } from 'Settings/Admin/Plugins';
import { PackagesAdminSettings } from 'Settings/Admin/Packages';
import { AboutAdminSettings } from 'Settings/Admin/About';
import { BrandingAdminSettings } from 'Settings/Admin/Branding';

import { getApp } from 'Helper/Apps/Admin';

Expand All @@ -27,16 +28,6 @@ class SettingsAdminScreen extends AbstractSettingsScreen {
* @param {Function=} fCallback = null
*/
setupSettings(fCallback = null) {
let branding = null,
licensing = null;

if (RL_COMMUNITY) {
branding = require('Settings/Admin/Branding').default;
} else {
branding = require('Settings/Admin/Prem/Branding').default;
licensing = require('Settings/Admin/Prem/Licensing').default;
}

addSettingsViewModel(
GeneralAdminSettings,
'AdminSettingsGeneral',
Expand All @@ -49,9 +40,7 @@ class SettingsAdminScreen extends AbstractSettingsScreen {

addSettingsViewModel(LoginAdminSettings, 'AdminSettingsLogin', 'TABS_LABELS/LABEL_LOGIN_NAME', 'login');

if (branding) {
addSettingsViewModel(branding, 'AdminSettingsBranding', 'TABS_LABELS/LABEL_BRANDING_NAME', 'branding');
}
addSettingsViewModel(BrandingAdminSettings, 'AdminSettingsBranding', 'TABS_LABELS/LABEL_BRANDING_NAME', 'branding');

addSettingsViewModel(ContactsAdminSettings, 'AdminSettingsContacts', 'TABS_LABELS/LABEL_CONTACTS_NAME', 'contacts');

Expand All @@ -68,10 +57,6 @@ class SettingsAdminScreen extends AbstractSettingsScreen {

addSettingsViewModel(PackagesAdminSettings, 'AdminSettingsPackages', 'TABS_LABELS/LABEL_PACKAGES_NAME', 'packages');

if (licensing) {
addSettingsViewModel(licensing, 'AdminSettingsLicensing', 'TABS_LABELS/LABEL_LICENSING_NAME', 'licensing');
}

addSettingsViewModel(AboutAdminSettings, 'AdminSettingsAbout', 'TABS_LABELS/LABEL_ABOUT_NAME', 'about');

runSettingsViewModelHooks(true);
Expand Down
7 changes: 2 additions & 5 deletions dev/Settings/Admin/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import ko from 'ko';
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
import { appSettingsGet, settingsGet } from 'Storage/Settings';

import AppStore from 'Stores/Admin/App';
import CoreStore from 'Stores/Admin/Core';

import { getApp } from 'Helper/Apps/Admin';
Expand All @@ -27,8 +26,6 @@ class AboutAdminSettings {
this.coreRemoteRelease = CoreStore.coreRemoteRelease;
this.coreVersionCompare = CoreStore.coreVersionCompare;

this.community = RL_COMMUNITY || AppStore.community();

this.coreRemoteVersionHtmlDesc = ko.computed(() => {
translatorTrigger();
return i18n('TAB_ABOUT/HTML_NEW_VERSION', { 'VERSION': this.coreRemoteVersion() });
Expand Down Expand Up @@ -59,13 +56,13 @@ class AboutAdminSettings {
}

onBuild() {
if (this.access() && !this.community) {
if (this.access()) {
getApp().reloadCoreData();
}
}

updateCoreData() {
if (!this.coreUpdating() && !this.community) {
if (!this.coreUpdating()) {
getApp().updateCoreData();
}
}
Expand Down
85 changes: 80 additions & 5 deletions dev/Settings/Admin/Branding.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ import { settingsSaveHelperSimpleFunction, trim } from 'Common/Utils';
import { i18n, trigger as translatorTrigger } from 'Common/Translator';

import Remote from 'Remote/Admin/Ajax';
import AppStore from 'Stores/Admin/App';

import { settingsGet } from 'Storage/Settings';

class BrandingAdminSettings {
constructor() {
this.capa = AppStore.prem;

this.title = ko.observable(settingsGet('Title')).idleTrigger();
this.loadingDesc = ko.observable(settingsGet('LoadingDescription')).idleTrigger();
this.faviconUrl = ko.observable(settingsGet('FaviconUrl')).idleTrigger();
Expand All @@ -36,8 +33,6 @@ class BrandingAdminSettings {
{ optValue: 'always', optText: i18n('TAB_BRANDING/OPTION_WELCOME_PAGE_DISPLAY_ALWAYS') }
];
});

this.community = RL_COMMUNITY || AppStore.community();
}

onBuild() {
Expand All @@ -64,6 +59,86 @@ class BrandingAdminSettings {
});
});
}, Magics.Time50ms);

_.delay(() => {
const f1 = settingsSaveHelperSimpleFunction(this.loginLogo.trigger, this),
f2 = settingsSaveHelperSimpleFunction(this.loginDescription.trigger, this),
f3 = settingsSaveHelperSimpleFunction(this.loginCss.trigger, this),
f4 = settingsSaveHelperSimpleFunction(this.userLogo.trigger, this),
f5 = settingsSaveHelperSimpleFunction(this.userLogoTitle.trigger, this),
f6 = settingsSaveHelperSimpleFunction(this.loginBackground.trigger, this),
f7 = settingsSaveHelperSimpleFunction(this.userCss.trigger, this),
f8 = settingsSaveHelperSimpleFunction(this.welcomePageUrl.trigger, this),
f9 = settingsSaveHelperSimpleFunction(this.welcomePageDisplay.trigger, this),
f10 = settingsSaveHelperSimpleFunction(this.userLogoMessage.trigger, this),
f11 = settingsSaveHelperSimpleFunction(this.userIframeMessage.trigger, this);

this.loginLogo.subscribe((value) => {
Remote.saveAdminConfig(f1, {
'LoginLogo': trim(value)
});
});

this.loginDescription.subscribe((value) => {
Remote.saveAdminConfig(f2, {
'LoginDescription': trim(value)
});
});

this.loginCss.subscribe((value) => {
Remote.saveAdminConfig(f3, {
'LoginCss': trim(value)
});
});

this.userLogo.subscribe((value) => {
Remote.saveAdminConfig(f4, {
'UserLogo': trim(value)
});
});

this.userLogoTitle.subscribe((value) => {
Remote.saveAdminConfig(f5, {
'UserLogoTitle': trim(value)
});
});

this.userLogoMessage.subscribe((value) => {
Remote.saveAdminConfig(f10, {
'UserLogoMessage': trim(value)
});
});

this.userIframeMessage.subscribe((value) => {
Remote.saveAdminConfig(f11, {
'UserIframeMessage': trim(value)
});
});

this.loginBackground.subscribe((value) => {
Remote.saveAdminConfig(f6, {
'LoginBackground': trim(value)
});
});

this.userCss.subscribe((value) => {
Remote.saveAdminConfig(f7, {
'UserCss': trim(value)
});
});

this.welcomePageUrl.subscribe((value) => {
Remote.saveAdminConfig(f8, {
'WelcomePageUrl': trim(value)
});
});

this.welcomePageDisplay.subscribe((value) => {
Remote.saveAdminConfig(f9, {
'WelcomePageDisplay': trim(value)
});
});
}, Magics.Time50ms);
}
}

Expand Down
3 changes: 0 additions & 3 deletions dev/Settings/Admin/Plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { boolToAjax } from 'Common/Utils';
import { settingsGet } from 'Storage/Settings';
import { showScreenPopup } from 'Knoin/Knoin';

import AppStore from 'Stores/Admin/App';
import PluginStore from 'Stores/Admin/Plugin';

import Remote from 'Remote/Admin/Ajax';
Expand All @@ -22,8 +21,6 @@ class PluginsAdminSettings {
this.plugins = PluginStore.plugins;
this.pluginsError = PluginStore.plugins.error;

this.community = RL_COMMUNITY || AppStore.community();

this.visibility = ko.computed(() => (PluginStore.plugins.loading() ? 'visible' : 'hidden'));

this.onPluginLoadRequest = _.bind(this.onPluginLoadRequest, this);
Expand Down
Loading