all
This commit is contained in:
parent
9c145da2e2
commit
fd5c0a2908
@ -82,7 +82,7 @@ def stuff(request):
|
|||||||
category = Category.objects.get(lti_platform_id=platform_id, lti_context_id=context_id)
|
category = Category.objects.get(lti_platform_id=platform_id, lti_context_id=context_id)
|
||||||
|
|
||||||
# Check if user has permission to upload to this category
|
# Check if user has permission to upload to this category
|
||||||
if request.user.has_upload_access_to_category(category):
|
if request.user.has_member_access_to_category(category):
|
||||||
ret['lti_category_uid'] = category.uid
|
ret['lti_category_uid'] = category.uid
|
||||||
except Category.DoesNotExist:
|
except Category.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
|||||||
@ -283,7 +283,7 @@ class MediaList(APIView):
|
|||||||
category = Category.objects.get(uid=publish_to_category)
|
category = Category.objects.get(uid=publish_to_category)
|
||||||
|
|
||||||
# Check if user has upload access to this category
|
# Check if user has upload access to this category
|
||||||
if request.user.has_upload_access_to_category(category):
|
if request.user.has_member_access_to_category(category):
|
||||||
media.category.add(category)
|
media.category.add(category)
|
||||||
except Category.DoesNotExist:
|
except Category.DoesNotExist:
|
||||||
# Category doesn't exist, silently ignore
|
# Category doesn't exist, silently ignore
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user