MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / list

Method list

apps/application/serializers/application.py:459–480  ·  view source on GitHub ↗
(self, instance: Dict)

Source from the content-addressed store, hash-verified

457 return workspace_user_role_mapping_model is not None and role_permission_mapping_model is not None
458
459 def list(self, instance: Dict):
460 self.is_valid(raise_exception=True)
461 workspace_id = self.data.get("workspace_id")
462 user_id = self.data.get("user_id")
463 req_dict = ApplicationQueryRequest(data=instance)
464 req_dict.is_valid(raise_exception=True)
465 workspace_manage = is_workspace_manage_permission_read(user_id, workspace_id, "APPLICATION:READ")
466 is_x_pack_ee = self.is_x_pack_ee()
467 return native_search(
468 self.get_query_set(req_dict.data, workspace_manage, is_x_pack_ee),
469 select_string=get_file_content(
470 os.path.join(
471 PROJECT_DIR,
472 "apps",
473 "application",
474 "sql",
475 "list_application.sql"
476 if workspace_manage
477 else ("list_application_user_ee.sql" if is_x_pack_ee else "list_application_user.sql"),
478 )
479 ),
480 )
481
482 def page(self, current_page: int, page_size: int, instance: Dict):
483 self.is_valid(raise_exception=True)

Callers 5

list_knowledgeMethod · 0.45
getMethod · 0.45
getMethod · 0.45
getMethod · 0.45
getMethod · 0.45

Calls 9

is_validMethod · 0.95
is_x_pack_eeMethod · 0.95
get_query_setMethod · 0.95
native_searchFunction · 0.90
get_file_contentFunction · 0.90
getMethod · 0.45
is_validMethod · 0.45

Tested by

no test coverage detected