summary refs log tree commit diff
path: root/synapse/storage/schema/delta
diff options
context:
space:
mode:
authorLuke Barnard <lukeb@openmarket.com>2017-10-26 16:51:32 +0100
committerLuke Barnard <lukeb@openmarket.com>2017-10-26 16:51:32 +0100
commit9b2feef9eb9502bf07d51378c75fc6b690a15676 (patch)
tree3505e346306f1fd8a2110e8bf42bbff56032b379 /synapse/storage/schema/delta
parentMerge pull request #2578 from matrix-org/rav/code_style_imports (diff)
downloadsynapse-9b2feef9eb9502bf07d51378c75fc6b690a15676.tar.xz
Add is_public to groups table to allow for private groups
Prevent group API access to non-members for private groups

Also make all the group code paths consistent with `requester_user_id` always being the User ID of the requesting user.
Diffstat (limited to 'synapse/storage/schema/delta')
-rw-r--r--synapse/storage/schema/delta/46/group_server.sql17
1 files changed, 17 insertions, 0 deletions
diff --git a/synapse/storage/schema/delta/46/group_server.sql b/synapse/storage/schema/delta/46/group_server.sql
new file mode 100644
index 0000000000..23ee1194d3
--- /dev/null
+++ b/synapse/storage/schema/delta/46/group_server.sql
@@ -0,0 +1,17 @@
+/* Copyright 2017 Vector Creations Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * 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.
+ */
+
+-- whether non-members can access group APIs
+ALTER TABLE groups ADD COLUMN is_public BOOL DEFAULT 1 NOT NULL;