misc: fix asset overwrite when CKEDITOR_RESTRICT_BY_USER is set
This commit is contained in:
parent
8654f59e38
commit
23e45534d1
|
@ -456,7 +456,7 @@ class AssetOverwrite(FormView):
|
|||
raise PermissionDenied() # better safe than sorry
|
||||
base_path = settings.CKEDITOR_UPLOAD_PATH
|
||||
if getattr(settings, 'CKEDITOR_RESTRICT_BY_USER', False):
|
||||
base_path = os.path.join(base_path, request.user.username)
|
||||
base_path = os.path.join(base_path, self.request.user.username)
|
||||
if not img_orig.startswith(base_path):
|
||||
raise PermissionDenied()
|
||||
|
||||
|
|
Loading…
Reference in New Issue