Fakultas Ilmu Komputer UI

Commit 6c6de10a authored by vagrant's avatar vagrant
Browse files

[GREEN] add implementation

parent 4e28f785
Pipeline #57915 passed with stages
in 12 minutes and 30 seconds
......@@ -282,7 +282,7 @@ class UploadMateriView(TemplateView):
return context
def post(self, request, *args, **kwargs):
if request.user.is_authenticated == False:
if request.user.is_authenticated == False or not request.user.is_contributor:
raise PermissionDenied(request)
form = UploadMateriForm(request.POST, request.FILES)
if form.is_valid():
......@@ -308,8 +308,9 @@ class UploadMateriView(TemplateView):
return self.render_to_response(context)
def get(self, request, *args, **kwargs):
if request.user.is_authenticated == False:
if request.user.is_authenticated == False or not request.user.is_contributor:
raise PermissionDenied(request)
context = self.get_context_data(**kwargs)
context["form"] = UploadMateriForm
return self.render_to_response(context)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment