fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1076830
)
fix
author
Radek Czajka
<rczajka@rczajka.pl>
Thu, 7 Apr 2022 10:01:15 +0000
(12:01 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Thu, 7 Apr 2022 10:01:15 +0000
(12:01 +0200)
src/catalogue/models/book.py
patch
|
blob
|
history
diff --git
a/src/catalogue/models/book.py
b/src/catalogue/models/book.py
index
9de4950
..
2371103
100644
(file)
--- a/
src/catalogue/models/book.py
+++ b/
src/catalogue/models/book.py
@@
-229,6
+229,8
@@
class Book(models.Model):
def is_accessible_to(self, user):
if not self.preview:
return True
+ if not user.is_authenticated:
+ return False
Membership = apps.get_model('club', 'Membership')
if Membership.is_active_for(user):
return True