Loading rpc/methods.py +0 −29 Original line number Diff line number Diff line Loading @@ -195,7 +195,6 @@ def _user_has_permission( # ALL RPC functions receive a User instance as first argument @_log_call @_rpc_groups(["Utilities"]) def ping(user: User) -> str: """ Loading @@ -211,7 +210,6 @@ def ping(user: User) -> str: return "pong {}".format(user.username) @_log_call @_rpc_groups(["Metadatas"]) def metadatasets(user: User, project_id: int) -> List[Dict]: """ Loading Loading @@ -243,7 +241,6 @@ def metadatasets(user: User, project_id: int) -> List[Dict]: raise ServiceException(NO_SUCH_PROJECT) @_log_call @_rpc_groups(["Metadatas"]) def metadatas(user: User, metadata_set_id: int) -> List[Dict]: """ Loading Loading @@ -288,7 +285,6 @@ def metadatas(user: User, metadata_set_id: int) -> List[Dict]: return data @_log_call @_rpc_groups(["Metadatas"]) def metadata(user: User, metadata_id: int) -> Dict: """ Loading Loading @@ -318,7 +314,6 @@ def metadata(user: User, metadata_id: int) -> Dict: return serializers.metadata(metadata_instance, cache=SerializerCache()) @_log_call @_rpc_groups(["Collections"]) def collections( user: User, Loading Loading @@ -426,7 +421,6 @@ def collections( return data @_log_call @_rpc_groups(["Collections"]) def collection(user: User, collection_id: int) -> Dict: """ Loading Loading @@ -759,7 +753,6 @@ def rename_meta(user: User, meta_id: int, title: str) -> bool: return True @_log_call @_rpc_groups(["Resources"]) def resources( user: User, Loading Loading @@ -847,7 +840,6 @@ def resources( return data @_log_call @_rpc_groups(["Resources"]) def resource(user: User, resource_id: int) -> Dict: """ Loading Loading @@ -969,7 +961,6 @@ def delete_resource(user: User, resource_id: int) -> bool: return True @_log_call @_rpc_groups(["Search"]) def simple_search( user: User, Loading Loading @@ -1067,7 +1058,6 @@ def simple_search( return results @_log_call @_rpc_groups(["Search"]) def advanced_search_terms(user: User) -> List[str]: """ Loading @@ -1086,7 +1076,6 @@ def advanced_search_terms(user: User) -> List[str]: return ["is", "contains", "does_not_contain"] @_log_call @_rpc_groups(["Search"]) def advanced_search( user: User, Loading Loading @@ -1300,7 +1289,6 @@ def advanced_search( return results @_log_call @_rpc_groups(["Search", "Collections", "Resources"]) def project_items( user: User, Loading @@ -1327,7 +1315,6 @@ def project_items( ) @_log_call @_rpc_groups(["Utilities"]) def upload_infos(user: User, sha256_hash: str, project_id: int) -> Dict: """ Loading Loading @@ -1367,7 +1354,6 @@ def upload_infos(user: User, sha256_hash: str, project_id: int) -> Dict: return infos @_log_call @_rpc_groups(["Utilities"]) def supported_file_types(user: User) -> List[Dict]: """ Loading Loading @@ -1725,7 +1711,6 @@ def change_resource_meta_value(user: User, meta_value_id: int, meta_value: str) return False @_log_call @_rpc_groups(["Collections"]) def ancestors_from_collection( user: User, collection_id: int, include_self: bool = False Loading Loading @@ -1820,7 +1805,6 @@ def ancestors_from_collection( return breadcrumb @_log_call @_rpc_groups(["Collections", "Resources"]) def ancestors_from_resource(user: User, resource_id: int) -> List[List[dict]]: """ Loading Loading @@ -1894,7 +1878,6 @@ def ancestors_from_resource(user: User, resource_id: int) -> List[List[dict]]: return ancestors @_log_call @_rpc_groups(["Metadatas"]) def metadatatypes(user: User) -> List[dict]: """ Loading Loading @@ -2048,7 +2031,6 @@ def delete_tag(user: User, uid: str) -> bool: raise ServiceException(NO_SUCH_TAG) @_log_call @_rpc_groups(["Tags"]) def tags(user: User, project_id: int) -> List[dict]: """ Loading Loading @@ -2352,7 +2334,6 @@ def create_project(user: User, project_label: str, project_description: str) -> return serializers.project(project, cache=SerializerCache()) @_log_call @_rpc_groups(["Access"]) def list_permissions(user: User) -> List[Dict]: """ Loading Loading @@ -2395,7 +2376,6 @@ def list_permissions(user: User) -> List[Dict]: return data @_log_call @_rpc_groups(["Access"]) def projects_user_permissions(user: User) -> List[Dict]: """ Loading @@ -2422,7 +2402,6 @@ def projects_user_permissions(user: User) -> List[Dict]: return access_list @_log_call @_rpc_groups(["Access"]) def has_permission(user: User, project_id: int, permission: str) -> bool: """ Loading @@ -2436,7 +2415,6 @@ def has_permission(user: User, project_id: int, permission: str) -> bool: return False @_log_call @_rpc_groups(["Access"]) def list_roles(user: User, project_id: int) -> List[Dict]: """ Loading Loading @@ -2520,7 +2498,6 @@ def move_items( return results @_log_call @_rpc_groups(["Projects"]) def project_stats(user: User, project_id: int) -> dict: """ Loading Loading @@ -2562,7 +2539,6 @@ def project_stats(user: User, project_id: int) -> dict: raise ServiceException(NO_SUCH_PROJECT) @_log_call @_rpc_groups(["Collections", "Resources"]) def collection_stats(user: User, collection_id: int) -> dict: """ Loading Loading @@ -2591,7 +2567,6 @@ def collection_stats(user: User, collection_id: int) -> dict: } @_log_call @_rpc_groups(["Utilities", "Collections", "Resources"]) def recycle_bin(user: User, project_id: int) -> List[Dict]: """ Loading Loading @@ -2691,7 +2666,6 @@ def restore_collection( return True @_log_call @_rpc_groups(["Metadatas"]) def meta_count(user: User, metadata_id: int, collection_id: int) -> dict: """ Loading Loading @@ -2725,7 +2699,6 @@ def meta_count(user: User, metadata_id: int, collection_id: int) -> dict: return return_dict @_log_call @_rpc_groups(["Collections"]) def public_collections(user: User, project_id: int) -> List[dict]: """ Loading Loading @@ -2785,7 +2758,6 @@ def delete_project_property(user: User, project_id: int, property_key: str) -> b raise ServiceException(NO_SUCH_PROJECT_PROPERTY) @_log_call @_rpc_groups(["Projects"]) def project_property(user: User, project_id: int, property_key: str) -> dict: """ Loading @@ -2809,7 +2781,6 @@ def project_property(user: User, project_id: int, property_key: str) -> dict: raise ServiceException(NO_SUCH_PROJECT_PROPERTY) @_log_call @_rpc_groups(["Projects"]) def project_properties(user: User, project_id: int) -> List[dict]: """ Loading Loading
rpc/methods.py +0 −29 Original line number Diff line number Diff line Loading @@ -195,7 +195,6 @@ def _user_has_permission( # ALL RPC functions receive a User instance as first argument @_log_call @_rpc_groups(["Utilities"]) def ping(user: User) -> str: """ Loading @@ -211,7 +210,6 @@ def ping(user: User) -> str: return "pong {}".format(user.username) @_log_call @_rpc_groups(["Metadatas"]) def metadatasets(user: User, project_id: int) -> List[Dict]: """ Loading Loading @@ -243,7 +241,6 @@ def metadatasets(user: User, project_id: int) -> List[Dict]: raise ServiceException(NO_SUCH_PROJECT) @_log_call @_rpc_groups(["Metadatas"]) def metadatas(user: User, metadata_set_id: int) -> List[Dict]: """ Loading Loading @@ -288,7 +285,6 @@ def metadatas(user: User, metadata_set_id: int) -> List[Dict]: return data @_log_call @_rpc_groups(["Metadatas"]) def metadata(user: User, metadata_id: int) -> Dict: """ Loading Loading @@ -318,7 +314,6 @@ def metadata(user: User, metadata_id: int) -> Dict: return serializers.metadata(metadata_instance, cache=SerializerCache()) @_log_call @_rpc_groups(["Collections"]) def collections( user: User, Loading Loading @@ -426,7 +421,6 @@ def collections( return data @_log_call @_rpc_groups(["Collections"]) def collection(user: User, collection_id: int) -> Dict: """ Loading Loading @@ -759,7 +753,6 @@ def rename_meta(user: User, meta_id: int, title: str) -> bool: return True @_log_call @_rpc_groups(["Resources"]) def resources( user: User, Loading Loading @@ -847,7 +840,6 @@ def resources( return data @_log_call @_rpc_groups(["Resources"]) def resource(user: User, resource_id: int) -> Dict: """ Loading Loading @@ -969,7 +961,6 @@ def delete_resource(user: User, resource_id: int) -> bool: return True @_log_call @_rpc_groups(["Search"]) def simple_search( user: User, Loading Loading @@ -1067,7 +1058,6 @@ def simple_search( return results @_log_call @_rpc_groups(["Search"]) def advanced_search_terms(user: User) -> List[str]: """ Loading @@ -1086,7 +1076,6 @@ def advanced_search_terms(user: User) -> List[str]: return ["is", "contains", "does_not_contain"] @_log_call @_rpc_groups(["Search"]) def advanced_search( user: User, Loading Loading @@ -1300,7 +1289,6 @@ def advanced_search( return results @_log_call @_rpc_groups(["Search", "Collections", "Resources"]) def project_items( user: User, Loading @@ -1327,7 +1315,6 @@ def project_items( ) @_log_call @_rpc_groups(["Utilities"]) def upload_infos(user: User, sha256_hash: str, project_id: int) -> Dict: """ Loading Loading @@ -1367,7 +1354,6 @@ def upload_infos(user: User, sha256_hash: str, project_id: int) -> Dict: return infos @_log_call @_rpc_groups(["Utilities"]) def supported_file_types(user: User) -> List[Dict]: """ Loading Loading @@ -1725,7 +1711,6 @@ def change_resource_meta_value(user: User, meta_value_id: int, meta_value: str) return False @_log_call @_rpc_groups(["Collections"]) def ancestors_from_collection( user: User, collection_id: int, include_self: bool = False Loading Loading @@ -1820,7 +1805,6 @@ def ancestors_from_collection( return breadcrumb @_log_call @_rpc_groups(["Collections", "Resources"]) def ancestors_from_resource(user: User, resource_id: int) -> List[List[dict]]: """ Loading Loading @@ -1894,7 +1878,6 @@ def ancestors_from_resource(user: User, resource_id: int) -> List[List[dict]]: return ancestors @_log_call @_rpc_groups(["Metadatas"]) def metadatatypes(user: User) -> List[dict]: """ Loading Loading @@ -2048,7 +2031,6 @@ def delete_tag(user: User, uid: str) -> bool: raise ServiceException(NO_SUCH_TAG) @_log_call @_rpc_groups(["Tags"]) def tags(user: User, project_id: int) -> List[dict]: """ Loading Loading @@ -2352,7 +2334,6 @@ def create_project(user: User, project_label: str, project_description: str) -> return serializers.project(project, cache=SerializerCache()) @_log_call @_rpc_groups(["Access"]) def list_permissions(user: User) -> List[Dict]: """ Loading Loading @@ -2395,7 +2376,6 @@ def list_permissions(user: User) -> List[Dict]: return data @_log_call @_rpc_groups(["Access"]) def projects_user_permissions(user: User) -> List[Dict]: """ Loading @@ -2422,7 +2402,6 @@ def projects_user_permissions(user: User) -> List[Dict]: return access_list @_log_call @_rpc_groups(["Access"]) def has_permission(user: User, project_id: int, permission: str) -> bool: """ Loading @@ -2436,7 +2415,6 @@ def has_permission(user: User, project_id: int, permission: str) -> bool: return False @_log_call @_rpc_groups(["Access"]) def list_roles(user: User, project_id: int) -> List[Dict]: """ Loading Loading @@ -2520,7 +2498,6 @@ def move_items( return results @_log_call @_rpc_groups(["Projects"]) def project_stats(user: User, project_id: int) -> dict: """ Loading Loading @@ -2562,7 +2539,6 @@ def project_stats(user: User, project_id: int) -> dict: raise ServiceException(NO_SUCH_PROJECT) @_log_call @_rpc_groups(["Collections", "Resources"]) def collection_stats(user: User, collection_id: int) -> dict: """ Loading Loading @@ -2591,7 +2567,6 @@ def collection_stats(user: User, collection_id: int) -> dict: } @_log_call @_rpc_groups(["Utilities", "Collections", "Resources"]) def recycle_bin(user: User, project_id: int) -> List[Dict]: """ Loading Loading @@ -2691,7 +2666,6 @@ def restore_collection( return True @_log_call @_rpc_groups(["Metadatas"]) def meta_count(user: User, metadata_id: int, collection_id: int) -> dict: """ Loading Loading @@ -2725,7 +2699,6 @@ def meta_count(user: User, metadata_id: int, collection_id: int) -> dict: return return_dict @_log_call @_rpc_groups(["Collections"]) def public_collections(user: User, project_id: int) -> List[dict]: """ Loading Loading @@ -2785,7 +2758,6 @@ def delete_project_property(user: User, project_id: int, property_key: str) -> b raise ServiceException(NO_SUCH_PROJECT_PROPERTY) @_log_call @_rpc_groups(["Projects"]) def project_property(user: User, project_id: int, property_key: str) -> dict: """ Loading @@ -2809,7 +2781,6 @@ def project_property(user: User, project_id: int, property_key: str) -> dict: raise ServiceException(NO_SUCH_PROJECT_PROPERTY) @_log_call @_rpc_groups(["Projects"]) def project_properties(user: User, project_id: int) -> List[dict]: """ Loading