Show More
@@ -5,6 +5,7 b' from boards.models import Tag' | |||||
5 |
|
5 | |||
6 | SESSION_SETTING = 'setting' |
|
6 | SESSION_SETTING = 'setting' | |
7 |
|
7 | |||
|
8 | # Remove this, it is not used any more cause there is a user's permission | |||
8 | PERMISSION_MODERATE = 'moderator' |
|
9 | PERMISSION_MODERATE = 'moderator' | |
9 |
|
10 | |||
10 | SETTING_THEME = 'theme' |
|
11 | SETTING_THEME = 'theme' |
@@ -1,5 +1,4 b'' | |||||
1 |
from boards.abstracts.settingsmanager import |
|
1 | from boards.abstracts.settingsmanager import get_settings_manager | |
2 | get_settings_manager |
|
|||
3 |
|
2 | |||
4 | __author__ = 'neko259' |
|
3 | __author__ = 'neko259' | |
5 |
|
4 | |||
@@ -19,7 +18,7 b" PERMISSION_MODERATE = 'moderation'" | |||||
19 |
|
18 | |||
20 |
|
19 | |||
21 | def user_and_ui_processor(request): |
|
20 | def user_and_ui_processor(request): | |
22 |
context = |
|
21 | context = dict() | |
23 |
|
22 | |||
24 | context[CONTEXT_PPD] = float(Post.objects.get_posts_per_day()) |
|
23 | context[CONTEXT_PPD] = float(Post.objects.get_posts_per_day()) | |
25 |
|
24 | |||
@@ -31,7 +30,7 b' def user_and_ui_processor(request):' | |||||
31 |
|
30 | |||
32 | # This shows the moderator panel |
|
31 | # This shows the moderator panel | |
33 | try: |
|
32 | try: | |
34 |
moderate = request.user.has_perm( |
|
33 | moderate = request.user.has_perm(PERMISSION_MODERATE) | |
35 | except AttributeError: |
|
34 | except AttributeError: | |
36 | moderate = False |
|
35 | moderate = False | |
37 | context[CONTEXT_MODERATOR] = moderate |
|
36 | context[CONTEXT_MODERATOR] = moderate |
General Comments 0
You need to be logged in to leave comments.
Login now