mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-13 06:06:06 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e535b4462 | ||
|
|
b560c6860b | ||
|
|
22b510e25b |
No files matched your search
+5
-2
@@ -346,13 +346,16 @@ class ForumTopicDetailView(CanViewMixin, DetailView):
|
|||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
|
|
||||||
class ForumMessageView(SingleObjectMixin, RedirectView):
|
class ForumMessageView(SingleObjectMixin, UserPassesTestMixin, RedirectView):
|
||||||
model = ForumMessage
|
model = ForumMessage
|
||||||
pk_url_kwarg = "message_id"
|
pk_url_kwarg = "message_id"
|
||||||
permanent = False
|
permanent = False
|
||||||
|
|
||||||
def get_redirect_url(self, *args, **kwargs):
|
def test_func(self) -> bool:
|
||||||
self.object = self.get_object()
|
self.object = self.get_object()
|
||||||
|
return self.request.user.can_view(self.object)
|
||||||
|
|
||||||
|
def get_redirect_url(self, *args, **kwargs):
|
||||||
return self.object.get_url()
|
return self.object.get_url()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ dependencies = [
|
|||||||
"django-countries>=9.1.0,<10.0.0",
|
"django-countries>=9.1.0,<10.0.0",
|
||||||
"dict2xml>=1.7.8,<2.0.0",
|
"dict2xml>=1.7.8,<2.0.0",
|
||||||
"Sphinx>=9.1.0,<10", # Used by xapian during installation
|
"Sphinx>=9.1.0,<10", # Used by xapian during installation
|
||||||
"tomli>=2.4.1,<3.0.0",
|
"tomli>=2.5.0,<3.0.0",
|
||||||
"django-honeypot>=1.3.0,<2",
|
"django-honeypot>=1.3.0,<2",
|
||||||
"pydantic-extra-types>=2.11.1,<3.0.0",
|
"pydantic-extra-types>=2.11.1,<3.0.0",
|
||||||
"ical>=14.2.0",
|
"ical>=14.2.0",
|
||||||
|
|||||||
Reference in new issue
Block a user