synapse guest module: change license

Set license to multi-license of AGPL + Element Commercial, and add
associated license files to the repository root.

This does not add a notice of "This file includes modifications" to any
files because they were only moved and relicensed, but otherwise
unmodified.

The exception is run_in_venv.sh, which is a rewrite of upstream's
run_in_venv.js and thus lacks the original copyright entirely.
This commit is contained in:
Andrew Ferrazzutti
2025-02-10 15:39:48 -05:00
parent 673bda4515
commit 226b89f846
13 changed files with 65 additions and 117 deletions
@@ -91,3 +91,15 @@ The module is not published to a python registry, but we provide a docker contai
+ name: synapse-modules + name: synapse-modules
# ... # ...
``` ```
## Copyright & License
Copyright 2023 Nordeck IT + Consulting GmbH
Copyright (c) 2025 New Vector Ltd
This software is multi licensed by New Vector Ltd (Element). It can be used either:
(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR
(2) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to).
Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.
@@ -4,7 +4,7 @@
"private": true, "private": true,
"description": "A synapse module to restrict the actions of guests", "description": "A synapse module to restrict the actions of guests",
"author": "New Vector Ltd.", "author": "New Vector Ltd.",
"license": "Apache-2.0", "license": "SEE LICENSE IN README.md",
"scripts": { "scripts": {
"prepare": "echo \"Nothing to prepare\"", "prepare": "echo \"Nothing to prepare\"",
"clean": "echo \"Nothing to clean\"", "clean": "echo \"Nothing to clean\"",
@@ -1,19 +1,8 @@
#!/usr/bin/env sh #!/usr/bin/env sh
# Copyright (C) 2025 New Vector Ltd.
# Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# A script to run a command in a python virtual environment that is stored in # A script to run a command in a python virtual environment that is stored in
# `<repo-root>/.venv`. If the virtual environment doesn't exist yet, it will # `<repo-root>/.venv`. If the virtual environment doesn't exist yet, it will
+4 -3
View File
@@ -4,9 +4,10 @@ description = A synapse module to restrict the actions of guests
long_description = file: README.md long_description = file: README.md
long_description_content_type = text/markdown long_description_content_type = text/markdown
version = 1.0.0 version = 1.0.0
license = AGPL-3.0-only OR LicenseRef-Element-Commercial
classifiers = license_files =
License :: OSI Approved :: Apache Software License ../../../LICENSE-AGPL-3.0
../../../LICENSE-COMMERCIAL
[options] [options]
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from synapse_guest_module.guest_module import GuestModule from synapse_guest_module.guest_module import GuestModule
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import attr import attr
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import logging import logging
from typing import Any, Dict, Literal, Tuple, Union from typing import Any, Dict, Literal, Tuple, Union
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import logging import logging
import secrets import secrets
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import logging import logging
import time import time
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import sqlite3 import sqlite3
from asyncio import Future from asyncio import Future
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import aiounittest import aiounittest
from synapse.module_api import ProfileInfo, UserProfile from synapse.module_api import ProfileInfo, UserProfile
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import io import io
from typing import cast from typing import cast
@@ -1,17 +1,11 @@
# Copyright 2023 Nordeck IT + Consulting GmbH # Copyright 2023 Nordeck IT + Consulting GmbH
# Copyright 2025 New Vector Ltd. # Copyright (C) 2025 New Vector Ltd.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
# you may not use this file except in compliance with the License. # Please see LICENSE files in the repository root for full details.
# You may obtain a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # Originally licensed under the Apache License, Version 2.0:
# # <http://www.apache.org/licenses/LICENSE-2.0>.
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import time import time
from unittest.mock import call from unittest.mock import call