Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
37e0405972 | ||
|
|
429683194f | ||
|
|
b2bc129d47 | ||
|
|
5e74f21865 | ||
|
|
070d306838 | ||
|
|
c9f1071363 |
12
CHANGELOG
12
CHANGELOG
@@ -130,3 +130,15 @@
|
|||||||
* Update Synapse to 1.14.0
|
* Update Synapse to 1.14.0
|
||||||
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.14.0)
|
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.14.0)
|
||||||
|
|
||||||
|
[1.3.0]
|
||||||
|
* Add optional sso support
|
||||||
|
|
||||||
|
[1.4.0]
|
||||||
|
* Update Synapse to 1.15.1
|
||||||
|
* [Full changelog](https://github.com/matrix-org/synapse/releases/tag/v1.15.0)
|
||||||
|
* Advertise support for Client-Server API r0.6.0 and remove related unstable feature flags. (#6585)
|
||||||
|
* Add an option to disable autojoining rooms for guest accounts. (#6637)
|
||||||
|
* Add admin APIs to allow server admins to manage users' devices. Contributed by @dklimpel. (#7481)
|
||||||
|
* Add support for generating thumbnails for WebP images. Previously, users would see an empty box instead of preview image. Contributed by @WGH-. (#7586)
|
||||||
|
* Support the standardized m.login.sso user-interactive authentication flow. (#7630)
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
"description": "file://DESCRIPTION.md",
|
"description": "file://DESCRIPTION.md",
|
||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"tagline": "Secure & decentralized communication",
|
"tagline": "Secure & decentralized communication",
|
||||||
"version": "1.2.0",
|
"version": "1.4.0",
|
||||||
"healthCheckPath": "/",
|
"healthCheckPath": "/",
|
||||||
"httpPort": 8008,
|
"httpPort": 8008,
|
||||||
"memoryLimit": 536870912,
|
"memoryLimit": 536870912,
|
||||||
@@ -31,5 +31,6 @@
|
|||||||
"changelog": "file://CHANGELOG",
|
"changelog": "file://CHANGELOG",
|
||||||
"postInstallMessage": "file://POSTINSTALL.md",
|
"postInstallMessage": "file://POSTINSTALL.md",
|
||||||
"minBoxVersion": "5.1.4",
|
"minBoxVersion": "5.1.4",
|
||||||
"documentationUrl": "https://cloudron.io/documentation/apps/synapse/"
|
"documentationUrl": "https://cloudron.io/documentation/apps/synapse/",
|
||||||
|
"optionalSso": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
This app packages Synapse <upstream>1.14.0</upstream>.
|
This app packages Synapse <upstream>1.15.1</upstream>.
|
||||||
|
|
||||||
**This package only provides the Matrix backend. A variety of clients are available
|
**This package only provides the Matrix backend. A variety of clients are available
|
||||||
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and
|
[here](https://matrix.org/clients/). Riot is a popular web frontend for Matrix and
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ RUN mkdir -p /app/pkg
|
|||||||
|
|
||||||
WORKDIR /app/code
|
WORKDIR /app/code
|
||||||
|
|
||||||
ARG VERSION=v1.14.0
|
ARG VERSION=v1.15.1
|
||||||
|
|
||||||
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
|
# https://pythonspeed.com/articles/activate-virtualenv-dockerfile/
|
||||||
RUN virtualenv -p python3 /app/code/env
|
RUN virtualenv -p python3 /app/code/env
|
||||||
|
|||||||
56
test/test.js
56
test/test.js
@@ -58,6 +58,37 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://matrix.org/docs/spec/client_server/latest#user-interactive-api-in-the-rest-api
|
||||||
|
function registerUser(done) {
|
||||||
|
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/register?kind=user').send({
|
||||||
|
username: username,
|
||||||
|
password: password,
|
||||||
|
inhibit_login: false
|
||||||
|
}).end(function (error, result) {
|
||||||
|
// we will first get a 401
|
||||||
|
let session = result.body.session;
|
||||||
|
console.log('session is', session);
|
||||||
|
if (result.statusCode !== 401) return done(new Error('Expecting a 401 ' + result.statusCode));
|
||||||
|
|
||||||
|
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/register?kind=user').send({
|
||||||
|
auth: {
|
||||||
|
type: 'm.login.dummy',
|
||||||
|
session: session
|
||||||
|
},
|
||||||
|
username: username,
|
||||||
|
password: password,
|
||||||
|
inhibit_login: false
|
||||||
|
}).end(function (error, result) {
|
||||||
|
if (error) return done(error);
|
||||||
|
if (result.statusCode !== 200) return done(new Error('Login failed with status ' + result.statusCode));
|
||||||
|
|
||||||
|
console.log('registered user with id', result.user_id);
|
||||||
|
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// https://matrix.org/docs/spec/client_server/latest
|
// https://matrix.org/docs/spec/client_server/latest
|
||||||
function checkLogin(done) {
|
function checkLogin(done) {
|
||||||
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/login').send({
|
superagent.post('https://' + app.fqdn + '/_matrix/client/r0/login').send({
|
||||||
@@ -114,6 +145,31 @@ describe('Application life cycle test', function () {
|
|||||||
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync('cloudron build', { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// No SSO
|
||||||
|
it('install app (no sso)', function () {
|
||||||
|
execSync('cloudron install --no-sso --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
});
|
||||||
|
|
||||||
|
it('can get app information', function () {
|
||||||
|
var inspect = JSON.parse(execSync('cloudron inspect'));
|
||||||
|
|
||||||
|
app = inspect.apps.filter(function (a) { return a.location === LOCATION; })[0];
|
||||||
|
|
||||||
|
expect(app).to.be.an('object');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('check landing page', checkLandingPage);
|
||||||
|
it('can register new user', registerUser);
|
||||||
|
it('can login', checkLogin);
|
||||||
|
it('check autojoin', checkAutoJoinRoom);
|
||||||
|
it('create room', createRoom);
|
||||||
|
it('check room', checkRoom);
|
||||||
|
|
||||||
|
it('uninstall app', function () {
|
||||||
|
execSync('cloudron uninstall --app ' + app.id, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
|
});
|
||||||
|
|
||||||
|
// SSO
|
||||||
it('install app', function () {
|
it('install app', function () {
|
||||||
execSync('cloudron install --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
execSync('cloudron install --location ' + LOCATION, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user