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

Function require_admin

Scripts/ButSystem.py:3662–3675  ·  view source on GitHub ↗

require_admin. Admin-only route handler. This docstring was expanded to make future maintenance easier. Returns: Varies.

()

Source from the content-addressed store, hash-verified

3660
3661Args:
3662 n: Parameter.
3663
3664Returns:
3665 Varies.
3666"""
3667 units = ["B", "KB", "MB", "GB", "TB"]
3668 x = float(n)
3669 for u in units:
3670 if x < 1024.0 or u == units[-1]:
3671 return f"{x:.1f} {u}" if u != "B" else f"{int(x)} {u}"
3672 x /= 1024.0
3673 return f"{n} B"
3674
3675
3676
3677# ---------------------------
3678# Admin helpers / kick support

Callers 15

admin_panelFunction · 0.70
admin_logsFunction · 0.70
admin_device_approveFunction · 0.70
admin_device_denyFunction · 0.70
admin_promoteFunction · 0.70
admin_demoteFunction · 0.70
admin_kick_userFunction · 0.70
admin_delete_userFunction · 0.70
admin_delete_meFunction · 0.70
admin_self_destructFunction · 0.70
bountyFunction · 0.70

Calls 2

user_is_adminFunction · 0.70
current_userFunction · 0.70

Tested by

no test coverage detected