Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add an admin API endpoint to support per-user feature flags #15344

Merged
merged 29 commits into from
Apr 28, 2023
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5a1f946
add an experimental features table and a class to access it
H-Shay Mar 28, 2023
ec04542
add an admin endpoint and handler class to access table
H-Shay Mar 28, 2023
0841f79
add some tests of basic functionality
H-Shay Mar 28, 2023
28f835a
newsframent
H-Shay Mar 28, 2023
1b68698
Merge branch 'develop' into shay/experimental_flags
H-Shay Mar 28, 2023
daf8a9f
fix schema delta
H-Shay Mar 28, 2023
dc6207a
fix bad import (thanks pycharm)
H-Shay Mar 28, 2023
845c07e
drop unnecessary handler class and user enum for verification
H-Shay Mar 28, 2023
c999fea
rewrite table
H-Shay Apr 4, 2023
5c9c4b7
allow for bulk setting/getting of features, cache result of getting
H-Shay Apr 4, 2023
6280124
update tests
H-Shay Apr 4, 2023
d3f7032
Merge branch 'develop' into shay/experimental_flags
H-Shay Apr 4, 2023
aa74c4a
update schema
H-Shay Apr 4, 2023
985eba9
Merge branch 'develop' into shay/experimental_flags
H-Shay Apr 17, 2023
2c1191d
update comments and schema number
H-Shay Apr 17, 2023
4847df7
add new boolean column to `port_db` script and capitalize FALSE
H-Shay Apr 20, 2023
1ca2989
properly handle boolean column in sqlite
H-Shay Apr 20, 2023
e86e39c
it's postgres, not postgre
H-Shay Apr 21, 2023
fadb5e6
make PUT and GET more symmetrical for ease of use
H-Shay Apr 21, 2023
0496d1d
Update docs/admin_api/experimental_features.md
H-Shay Apr 24, 2023
2044c14
update docs
H-Shay Apr 24, 2023
dcc9c41
fix the urls
H-Shay Apr 26, 2023
37e7f30
get rid of sqlite-specific table
H-Shay Apr 26, 2023
401cb10
schema version is now 75 so move file
H-Shay Apr 26, 2023
8927eae
Apply suggestions from code review
H-Shay Apr 28, 2023
17e48be
Merge branch 'develop' into shay/experimental_flags
H-Shay Apr 28, 2023
427d65f
fix schema drift
H-Shay Apr 28, 2023
80d3f69
Merge branch 'shay/experimental_flags' of https://github.com/matrix-o…
H-Shay Apr 28, 2023
6a994dd
update test to accompdate new error message
H-Shay Apr 28, 2023
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
Prev Previous commit
Next Next commit
rewrite table
  • Loading branch information
H-Shay committed Apr 4, 2023
commit c999feaea9a360d75ff8c1b700514a26cbafe747
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,15 @@
* limitations under the License.
*/

-- Table containing a list of experimental features and whether they are
-- enabled for a given user
-- Table containing experimental features and whether they are enabled for a given user
CREATE TABLE per_user_experimental_features (
-- The User ID to check/set the feature for
user_id TEXT NOT NULL PRIMARY KEY,

-- busy presence state enabled
msc3026 BOOLEAN,

-- enable unread counts
msc2654 BOOLEAN,

-- enable remotely toggling push notifications for another client
msc3881 BOOLEAN,

-- Do not require UIA when first uploading cross signing keys
msc3967 BOOLEAN
user_id TEXT NOT NULL,
-- Contains features to be enabled/disabled
feature TEXT NOT NULL,
-- whether the feature is enabled/disabled for a given user, defaults to disabled
enabled BOOLEAN DEFAULT false,
FOREIGN KEY (user_id) REFERENCES users(name),
PRIMARY KEY (user_id, feature)
);