Commit 0d596026 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Prevent non-authenticated users from accessing member birthdays

parent fd7e291c
......@@ -49,6 +49,7 @@
{% endif %}
{% endspaceless %},
customButtons: {
{% if request.user.is_authenticated %}
showBirthdays: {
text: Cookies.get('showbirthdays') ? '{% trans "hide birthdays" %}' : '{% trans "show birthdays" %}',
click: function(e) {
......@@ -64,6 +65,7 @@
}
}
}
{% endif %}
},
header: {
right: 'showBirthdays, list,agendaWeek,month prev,next today'
......@@ -106,4 +108,4 @@
<script type="text/javascript" src="{% static "events/js/fullcalendar-nl.js" %}"></script>
<script type="text/javascript" src="{% static "events/js/js.cookie.js" %}"></script>
<script type="text/javascript" src="{% static "events/js/calendarlistview.js" %}"></script>
{% endblock js_body %}
\ No newline at end of file
{% endblock js_body %}
......@@ -6,6 +6,7 @@ from rest_framework import viewsets
from rest_framework.decorators import list_route
from rest_framework.exceptions import ParseError
from rest_framework.response import Response
from rest_framework import permissions
from members.api.serializers import MemberBirthdaySerializer
from members.models import Member
......@@ -13,6 +14,7 @@ from members.models import Member
class MemberViewset(viewsets.ViewSet):
queryset = Member.objects.all()
permission_classes = (permissions.IsAuthenticated,)
def _get_birthdays(self, member, start, end):
birthdays = []
......
......@@ -7,235 +7,222 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-10-26 21:16+0200\n"
"PO-Revision-Date: 2016-10-26 21:17+0200\n"
"Last-Translator: Thom Wiggers <thom@thomwiggers.nl>\n"
"POT-Creation-Date: 2016-10-28 23:57+0200\n"
"PO-Revision-Date: 2016-10-29 00:04+0200\n"
"Last-Translator: Sébastiaan Versteeg <se_bastiaan@outlook.com>\n"
"Language-Team: \n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.9\n"
"X-Generator: Poedit 1.8.10\n"
#: members/admin.py:28
#: admin.py:29
msgid "membership type"
msgstr "lidtype"
#: members/admin.py:51
#: admin.py:52
msgid "Age"
msgstr "Leeftijd"
#: members/admin.py:56
#: admin.py:57
msgid "≥ 18"
msgstr "≥ 18"
#: members/admin.py:57
#: admin.py:58
msgid "< 18"
msgstr "< 18"
#: members/admin.py:58
#: admin.py:59
msgid "Unknown"
msgstr "Onbekend"
#: members/admin.py:115
msgid "First name"
msgstr "Voornaam"
#: members/admin.py:116
msgid "Last name"
msgstr "Achternaam"
#: members/admin.py:117
msgid "Address"
msgstr "Adres"
#: members/admin.py:118
msgid "Address line 2"
msgstr "Tweede adresregel"
#: members/admin.py:119 members/models.py:148
msgid "Postal code"
msgstr "Postcode"
#: members/admin.py:120 members/models.py:154
msgid "City"
msgstr "Woonplaats"
#: members/admin.py:130
#: admin.py:127
msgid "Download address label for selected users"
msgstr "Download adreslabels voor geselecteerde gebruikers"
#: members/forms.py:35
#: forms.py:35
msgid "Send welcome email"
msgstr "Stuur welkomste-mails"
#: members/forms.py:36
#: forms.py:36
msgid "This email will include the generated password"
msgstr "Deze e-mail zal het gegenereerde wachtwoord bevatten"
#: members/models.py:54
#: models.py:54
msgid "Computing Science"
msgstr "Informatica"
#: members/models.py:55
#: models.py:55
msgid "Information Sciences"
msgstr "Informatiekunde"
#: members/models.py:67 members/templates/members/profile.html:38
#: models.py:67 templates/members/profile.html:38
msgid "Study programme"
msgstr "Studie"
#: members/models.py:76
#: models.py:76
msgid "Enter a valid student- or e/z/u-number."
msgstr "Voer een geldig student- of e/z/u-nummer in."
#: members/models.py:82
#: models.py:82
msgid "Starting year"
msgstr "Eerste lidmaatschapsjaar"
#: members/models.py:83
#: models.py:83
msgid "The year this member started studying."
msgstr "Het jaar waarop dit lid begon met studeren."
#: members/models.py:119
#: models.py:119
msgid "Is this user currently active"
msgstr "Is deze user op dit moment actief"
#: members/models.py:133
#: models.py:133
msgid "Include the house number"
msgstr "Inclusief huisnummer"
#: members/models.py:135
#: models.py:135
msgid "Street and house number"
msgstr "Straat en huisnummer"
#: members/models.py:141
#: models.py:141
msgid "Second address line"
msgstr "Tweede adresregel"
#: members/models.py:160
#: models.py:148
msgid "Postal code"
msgstr "Postcode"
#: models.py:154
msgid "City"
msgstr "Woonplaats"
#: models.py:160
msgid "Phone number"
msgstr "Telefoonnummer"
#: members/models.py:161
#: models.py:161
msgid "Enter a phone number so Thalia may reach you"
msgstr "Voer een telefoonnummer in zodat Thalia je kan bereiken"
#: members/models.py:164 members/models.py:186
#: models.py:164 models.py:186
msgid "Please enter a valid phone number"
msgstr "Voer svp een geldig telefoonnummer in"
#: members/models.py:174
#: models.py:174
msgid "Emergency contact name"
msgstr "Contact voor noodgevallen"
#: members/models.py:175
#: models.py:175
msgid "Who should we contact in case of emergencies"
msgstr "Wie Thalia moet bereiken in bij noodgevallen"
#: members/models.py:182
#: models.py:182
msgid "Emergency contact phone number"
msgstr "Telefoonnummer noodcontact"
#: members/models.py:183
#: models.py:183
msgid "The phone number for the emergency contact"
msgstr "Het telefoonummer van de noodcontact"
#: members/models.py:195 members/templates/members/profile.html:45
#: models.py:195 templates/members/profile.html:45
msgid "Birthday"
msgstr "Verjaardag"
#: members/models.py:200
#: models.py:200
msgid "Display birthday"
msgstr "Laat verjaardag zien"
#: members/models.py:202
msgid "Show the birthday on your profile page and in the birthday calendar"
#: models.py:202
msgid ""
"Show your birthday to other members on your profile page and in the birthday "
"calendar"
msgstr ""
"Laat de verjaardag op je profielpagina en in de verjaardagskalender zien"
"Toon je verjaardag aan andere leden op je profielpagina en in de "
"verjaardagskalender"
#: members/models.py:209 members/templates/members/profile.html:41
#: models.py:209 templates/members/profile.html:41
msgid "Website"
msgstr "Website"
#: members/models.py:210
#: models.py:210
msgid "Website to display on your profile page"
msgstr "Website om op je profiel te linken"
#: members/models.py:216
#: models.py:216
msgid "Profile text"
msgstr "Profieltekst"
#: members/models.py:217
#: models.py:217
msgid "Text to display on your profile"
msgstr "Tekst om te laten zien op je profielpagina"
#: members/models.py:224
#: models.py:224
msgid "Initials"
msgstr "Initialen"
#: members/models.py:231
#: models.py:231
msgid "Nickname"
msgstr "Bijnaam"
#: members/models.py:238
#: models.py:238
msgid "How to display name"
msgstr "Weergave naam"
#: members/models.py:239
#: models.py:239
msgid "Show full name"
msgstr "Volledige naam"
#: members/models.py:240
#: models.py:240
msgid "Show only nickname"
msgstr "Alleen initialen"
#: members/models.py:241
#: models.py:241
msgid "Show only first name"
msgstr "Alleen voornaam"
#: members/models.py:242
#: models.py:242
msgid "Show initials and last name"
msgstr "Alleen initialen en achternaam"
#: members/models.py:243
#: models.py:243
msgid "Show name like \"John 'nickname' Doe\""
msgstr "Laat zien als \"John 'bijnaam' Doe\""
#: members/models.py:244
#: models.py:244
msgid "Show nickname and last name"
msgstr "Laat bijnaam en achternaam zien"
#: members/models.py:249
#: models.py:249
msgid "Photo"
msgstr "Foto"
#: members/models.py:258
#: models.py:258
msgid "Preferred language"
msgstr "Voorkeurstaal"
#: members/models.py:259
#: models.py:259
msgid "Preferred language for e.g. news letters"
msgstr "Voorkeurstaal voor b.v.b. nieuwsbrieven"
#: members/models.py:266
#: models.py:266
msgid "Receive opt-in mailings"
msgstr "Ontvang opt-in mailings"
#: members/models.py:267
#: models.py:267
msgid "Receive mailings about vacancies and events from Thalia's sponsors."
msgstr "Ontvang mailings over vacatures en evenmenten van Thalia's sponsoren"
#: members/models.py:273
#: models.py:273
msgid "Receive newsletter"
msgstr "Ontvang nieuwsbrief"
#: members/models.py:274
#: models.py:274
msgid "Receive the Thalia Newsletter"
msgstr "Ontvang de Thalia nieuwsbrief"
#: members/models.py:281
#: models.py:281
msgid ""
"Yes, I want Thalia to take the membership fees from my bank account through "
"direct debit for each year."
......@@ -243,127 +230,124 @@ msgstr ""
"Ja, ik wil dat Thalia verschuldigde lidmaatschapsgelden elk jaar van mijn "
"bankrekening afschrijft."
#: members/models.py:284
#: models.py:284
msgid "No, I will pay the contribution myself"
msgstr "Nee, ik zal de contributie zelf betalen"
#: members/models.py:285
#: models.py:285
msgid "Direct debit"
msgstr "Automatische afschijving"
#: members/models.py:286
#: models.py:286
msgid "Each year, have Thalia take the membership fees from my bank account"
msgstr ""
"Laat Thalia elk jaar het lidmaatschapsgeld van mijn bankrekening afschrijven"
#: members/models.py:292
#: models.py:292
msgid "Bank account"
msgstr "Bankrekening"
#: members/models.py:293
#: models.py:293
msgid "Bank account for direct debit"
msgstr "Bankrekening voor automatische afschrijving"
#: members/models.py:315
#: models.py:315
msgid "Display name"
msgstr "Weergavenaam"
#: members/models.py:340
#: models.py:340
msgid "Member"
msgstr "Lid"
#: members/models.py:341
#: models.py:341
msgid "Supporter"
msgstr "Begunstiger"
#: members/models.py:342
#: models.py:342
msgid "Honorary Member"
msgstr "Erelid"
#: members/models.py:347
#: models.py:347
msgid "Membership type"
msgstr "Lidtype"
#: members/models.py:356
#: models.py:356
msgid "User"
msgstr "Gebruiker"
#: members/models.py:360
#: models.py:360
msgid "Membership since"
msgstr "Lid sinds"
#: members/models.py:361
#: models.py:361
msgid "The date the member started holding this membership."
msgstr "De datum waarop het lid dit lidmaatschap is begonnen."
#: members/models.py:366
#: models.py:366
msgid "Membership until"
msgstr "Lid tot"
#: members/models.py:367
#: models.py:367
msgid "The date the member stops holding this membership."
msgstr "De datum waarop het lid dit lidmaatschap beëindigd."
#: members/templates/members/account.html:6
#: members/templates/members/edit_profile.html:5
#: members/templates/members/index.html:6
#: members/templates/members/index.html:9
#: members/templates/members/profile.html:6
#: templates/members/account.html:6 templates/members/edit_profile.html:5
#: templates/members/index.html:6 templates/members/index.html:9
#: templates/members/profile.html:6
msgid "members"
msgstr "leden"
#: members/templates/members/account.html:9
#: templates/members/account.html:9
msgid "Account"
msgstr "Bankrekening"
#: members/templates/members/account.html:14
#: templates/members/account.html:14
#, python-format
msgid "You’re currently logged in as <strong>%(user)s</strong>"
msgstr "U bent momenteel ingelogd als <strong>%(user)s</strong>"
#: members/templates/members/account.html:19
#: templates/members/account.html:19
msgid "show public profile"
msgstr "bekijk publieke profielpagina"
#: members/templates/members/account.html:20
#: templates/members/account.html:20
msgid "Take a look at your own profile."
msgstr "Bekijk je eigen profielpagina."
#: members/templates/members/account.html:26
#: members/templates/members/edit_profile.html:5
#: members/templates/members/edit_profile.html:8
#: templates/members/account.html:26 templates/members/edit_profile.html:5
#: templates/members/edit_profile.html:8
msgid "edit profile"
msgstr "profiel bewerken"
#: members/templates/members/account.html:27
#: templates/members/account.html:27
msgid "Edit your profile and avatar."
msgstr "Bewerk je profiel en profielafbeelding."
#: members/templates/members/account.html:33
#: templates/members/account.html:33
msgid "change password"
msgstr "wachtwoord wijzigen"
#: members/templates/members/account.html:34
#: templates/members/account.html:34
msgid "Change your accounts' password."
msgstr "Wijzig het wachtwoord van je account."
#: members/templates/members/account.html:40
#: templates/members/account.html:40
msgid "logout"
msgstr "uitloggen"
#: members/templates/members/account.html:41
#: templates/members/account.html:41
msgid "Leave the restricted area of the website."
msgstr "Verlaat het beveiligde gedeelte van de website."
#: members/templates/members/edit_profile.html:12
#: templates/members/edit_profile.html:12
msgid "Your profile has been updated successfully."
msgstr "Je profiel is succesvol opgeslagen."
#: members/templates/members/edit_profile.html:38
#: templates/members/edit_profile.html:38
msgid "save"
msgstr "opslaan"
#: members/templates/members/email/welcome.txt:1
#: templates/members/email/welcome.txt:1
#, python-format
msgid ""
"Dear %(user.get_full_name)s, Welcome to Study Association Thalia! You now "
......@@ -372,8 +356,13 @@ msgid ""
"%(password)s Please also check the information on your profile. Cheers, "
"Thalia"
msgstr ""
"Beste %(user.get_full_name)s, Welkom bij Studievereniging Thalia! Je hebt nu "
"een account zodat je kunt inloggen op https://thalia.nu/. Dit zijn je "
"gebruikersnaam en wachtwoord: Je gebruikersnaam is: %(user.username)s Je "
"wachtwoord: %(password)s Controleer alsjeblieft ook de gegevens in je "
"profiel. Groetjes, Thalia"
#: members/templates/members/index.html:12
#: templates/members/index.html:12
msgid ""
"Ever wondered what the name of that person in the back row of the lecture "
"room is? Or maybe you're just looking for a group member's email address? "
......@@ -386,76 +375,86 @@ msgstr ""
"spreken. Er bestaat een grote kans dat die persoon lid van Thalia is, en dus "
"is opgenomen in de onderstaande ledenlijst."
#: members/templates/members/index.html:25
#: templates/members/index.html:25
msgid "Who are you looking for?"
msgstr "Wie zoek je?"
#: members/templates/members/index.html:26
#: templates/members/index.html:26
msgid "Search"
msgstr "Zoeken"
#: members/templates/members/index.html:34
#: templates/members/index.html:34
msgid "All members"
msgstr "Alle leden"
#: members/templates/members/index.html:38
#: templates/members/index.html:38
msgid "Older"
msgstr "Ouder"
#: members/templates/members/index.html:39
#: templates/members/index.html:39
msgid "Honorary Members"
msgstr "Ere-leden"
#: members/templates/members/index.html:40
#: templates/members/index.html:40
msgid "Former Members"
msgstr "Ex-leden"
#: members/templates/members/index.html:46
#: templates/members/index.html:46
msgid "No members found"
msgstr "Geen leden gevonden"
#: members/templates/members/index.html:62
#: members/templates/members/profile.html:36
#: templates/members/index.html:62 templates/members/profile.html:36
msgid "Cohort"
msgstr "Cohort"
#: members/templates/members/index.html:99
#: templates/members/index.html:99
msgid "Next"
msgstr "Volgende"
#: members/templates/members/profile.html:6
#: templates/members/profile.html:6
msgid "profile"
msgstr "profiel"
#: members/templates/members/profile.html:25
#: templates/members/profile.html:25
msgid "About"
msgstr "Over"
#: members/templates/members/profile.html:28
#: templates/members/profile.html:28
msgid "This member has not written a description yet."
msgstr "Dit lid heeft nog geen beschrijving geschreven."
#: members/templates/members/profile.html:34
#: templates/members/profile.html:34
msgid "Personal information"
msgstr "Persoonlijke gegevens"
#: members/templates/members/profile.html:51
#: templates/members/profile.html:51
msgid "Achievements for Thalia"
msgstr "Verdiensten voor Thalia"
#: members/templates/members/profile.html:61
#: templates/members/profile.html:61
msgid "today"
msgstr "heden"
#: members/templates/members/statistics.html:5
#: members/templates/members/statistics.html:8
#: templates/members/statistics.html:5 templates/members/statistics.html:8
msgid "Statistics"
msgstr "Statistieken"
#: members/templates/members/statistics.html:10
#: templates/members/statistics.html:10
msgid "Total amount of Thalia members"
msgstr "Totaal aantal Thalialeden"
#~ msgid "First name"
#~ msgstr "Voornaam"
#~ msgid "Last name"
#~ msgstr "Achternaam"
#~ msgid "Address"
#~ msgstr "Adres"
#~ msgid "Address line 2"
#~ msgstr "Tweede adresregel"
#~ msgid "These are the current members:"
#~ msgstr "Dit zijn de huidige leden:"
......
......@@ -199,7 +199,7 @@ class Member(models.Model):
show_birthday = models.BooleanField(
verbose_name=_('Display birthday'),
help_text=_(
'Show the birthday on your profile page and '
'Show your birthday to other members on your profile page and '
'in the birthday calendar'),
default=True,
)
......
Markdown is supported
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