Skip to content

Commit

Permalink
import DOWNLOAD_SAVED_PERMISSION instead of direcly define the perm s…
Browse files Browse the repository at this point in the history
…tring again
  • Loading branch information
MrTango committed Nov 3, 2023
1 parent d202c9d commit 91b9ab7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/collective/easyform/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

from collective.easyform.api import get_actions
from collective.easyform.api import get_schema
from collective.easyform.config import DOWNLOAD_SAVED_PERMISSION
from collective.easyform.interfaces import IEasyForm
from collective.easyform.interfaces import ISaveData
from Products.CMFPlone.utils import safe_unicode
Expand All @@ -38,7 +39,7 @@
class SerializeToJson(DXContentToJson):
def __call__(self, version=None, include_items=True):
result = super(SerializeToJson, self).__call__(version, include_items)
if api.user.has_permission('collective.easyform.DownloadSavedInput', obj=self.context):
if api.user.has_permission(DOWNLOAD_SAVED_PERMISSION, obj=self.context):
self.serializeSavedData(result)
return result

Expand Down

0 comments on commit 91b9ab7

Please sign in to comment.