Skip to content

Commit

Permalink
Addition of Other Methods to IResourceController
Browse files Browse the repository at this point in the history
  • Loading branch information
keita-yasuda committed May 15, 2024
1 parent 9b0c531 commit 0b9171a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions ckanext/feedback/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from ckan.common import _, config
from ckan.lib.plugins import DefaultTranslation
from ckan.plugins import toolkit
from ckan.types import Context

from ckanext.feedback.command import feedback
from ckanext.feedback.services.common import check
Expand Down Expand Up @@ -270,6 +271,35 @@ def get_helpers(self):

# IResourceController

def before_resource_create(
self, context: Context, resource: dict[str, Any]
) -> None:
return

def after_resource_create(self, context: Context, resource: dict[str, Any]) -> None:
return

def before_resource_update(
self, context: Context, current: dict[str, Any], resource: dict[str, Any]
) -> None:
return

def after_resource_update(self, context: Context, resource: dict[str, Any]) -> None:
return

def before_resource_delete(
self,
context: Context,
resource: dict[str, Any],
resources: list[dict[str, Any]],
) -> None:
return

def after_resource_delete(
self, context: Context, resources: list[dict[str, Any]]
) -> None:
return

def before_resource_show(self, resource_dict: dict[str, Any]) -> dict[str, Any]:
owner_org = model.Package.get(resource_dict['package_id']).owner_org
resource_id = resource_dict['id']
Expand Down

0 comments on commit 0b9171a

Please sign in to comment.