REDROOM
PHP 8.3.31
Path:
Logout
Edit File
Size: 1.26 KB
Close
//opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/feature_management/rpc/endpoints/utils.py
Text
Base64
import inspect from defence360agent.feature_management.control import ( is_native_feature_management_enabled, ) from defence360agent.rpc_tools.lookup import wraps from defence360agent.rpc_tools.validate import ValidationError def builtin_feature_management_only(cls): """ This decorator is intended to wrap rpc endpoint classes. It will throw ValidationError if native feature management is enabled when any of decorated class methods is called """ def _wrapper(coro): @wraps(coro) async def wrapper(*args, **kwargs): if await is_native_feature_management_enabled(): raise ValidationError( "Command is disabled because native " "feature management is enabled. " "Please use your hosting panel interface" " to manage features" ) return await coro(*args, **kwargs) return wrapper assert inspect.isclass(cls), "This decorator can only be used for classes" for m_name, m_obj in getattr(cls, "__dict__", {}).items(): if not m_name.startswith("_") and inspect.iscoroutinefunction(m_obj): wrapped = _wrapper(m_obj) setattr(cls, m_name, wrapped) return cls
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2026-06-08 20:23:14
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
native.py
1.47 KB
lrw-r--r--
2026-05-26 21:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
show.py
2.55 KB
lrw-r--r--
2026-05-26 21:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
update.py
2.24 KB
lrw-r--r--
2026-05-26 21:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utils.py
1.26 KB
lrw-r--r--
2026-05-26 21:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
75 B
lrw-r--r--
2026-05-26 21:20:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).