security: bound MXID changes, preserve Cloudron groups, refuse guest invites onto existing accounts, legacy no-tier cutoff, internal-only key feed
ci/woodpecker/push/woodpecker Pipeline failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
1 parent
4554bf3251
commit
a215b5f9c9
3 files changed
+233
-18
No files matched your search
@@ -75,6 +75,19 @@ calls = {"group": [], "budget": [], "pin": [], "email": [], "listmonk": [],
|
||||
"loomio": 0, "matrix": 0, "revoke": [], "owui": [], "subscribe": []}
|
||||
|
||||
|
||||
async def fake_fetch_users(client):
|
||||
# No existing Cloudron account for the fixture addresses.
|
||||
return []
|
||||
|
||||
|
||||
async def fake_email_exists(email):
|
||||
return False
|
||||
|
||||
|
||||
async def rec_switch(user_id, add_gid=None, remove_gids=()):
|
||||
calls["group"].append((user_id, add_gid))
|
||||
|
||||
|
||||
async def rec_group(user_id, group_id=None):
|
||||
calls["group"].append((user_id, group_id or m.MEMBERS_GROUP_ID))
|
||||
|
||||
@@ -155,6 +168,9 @@ async def fake_activated(user_id):
|
||||
return False
|
||||
|
||||
|
||||
m.cloudron_fetch_all_users = fake_fetch_users
|
||||
m.cloudron_email_exists = fake_email_exists
|
||||
m.cloudron_switch_group = rec_switch
|
||||
m.cloudron_set_group = rec_group
|
||||
m.cloudron_set_active = rec_group # same signature (uid, bool); recorded nowhere critical
|
||||
m.cloudron_create_user = fake_user_create
|
||||
|
||||
@@ -119,6 +119,17 @@ calls = {"group": [], "budget": [], "email": [], "listmonk": [], "loomio": 0,
|
||||
"matrix": 0}
|
||||
|
||||
|
||||
async def fake_email_exists(email):
|
||||
return False
|
||||
|
||||
|
||||
m.cloudron_email_exists = fake_email_exists
|
||||
|
||||
|
||||
async def rec_switch(user_id, add_gid=None, remove_gids=()):
|
||||
calls["group"].append((user_id, add_gid))
|
||||
|
||||
|
||||
async def rec_group(user_id, group_id=None):
|
||||
calls["group"].append((user_id, group_id or m.MEMBERS_GROUP_ID))
|
||||
|
||||
@@ -168,6 +179,7 @@ def fake_team_db(team_id):
|
||||
return {"max_budget": None, "spend": 0.0, "budget_reset_at": None}
|
||||
|
||||
|
||||
m.cloudron_switch_group = rec_switch
|
||||
m.cloudron_set_group = rec_group
|
||||
m.cloudron_set_active = rec_group
|
||||
m.cloudron_create_user = fake_user_create
|
||||
|
||||
Reference in new issue
Block a user