MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / scope_capacity_ok

Function scope_capacity_ok

Scripts/ButSystem.py:1243–1252  ·  view source on GitHub ↗

Enforce a maximum of 20 users per scope (plus 1 admin = 21).

(username: str, is_admin_flag: bool, scope: str)

Source from the content-addressed store, hash-verified

1241 FROM dm_messages
1242 WHERE recipient=? AND read_at IS NULL AND (deleted_at IS NULL OR deleted_at='')
1243 GROUP BY sender
1244 """, (me,)).fetchall()
1245 conn.close()
1246 by = {r["sender"]: int(r["c"]) for r in rows} if rows else {}
1247 return sum(by.values()), by
1248
1249# ---------------------------
1250# Session key
1251# ---------------------------
1252
1253def load_or_create_session_key() -> str:
1254 """load_or_create_session_key.
1255

Callers 3

loginFunction · 0.70
two_factorFunction · 0.70

Calls 1

online_usernamesFunction · 0.70

Tested by

no test coverage detected