diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-08-09 19:55:29 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2010-08-09 19:55:29 -0400 |
commit | f237fdf287e007d78ecc9996bbb87383cfc8d493 (patch) | |
tree | 5923fbfb4ef6b4bb519820910c9e86abeeb09777 /askbot/auth.py | |
parent | 774ef8a673e7135ca0cd7f4f7c1099971aaa07ba (diff) | |
download | askbot-f237fdf287e007d78ecc9996bbb87383cfc8d493.tar.gz askbot-f237fdf287e007d78ecc9996bbb87383cfc8d493.tar.bz2 askbot-f237fdf287e007d78ecc9996bbb87383cfc8d493.zip |
editing and retagging is under moderation rules
Diffstat (limited to 'askbot/auth.py')
-rw-r--r-- | askbot/auth.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/askbot/auth.py b/askbot/auth.py index 33caed13..381143b5 100644 --- a/askbot/auth.py +++ b/askbot/auth.py @@ -18,41 +18,6 @@ import logging from askbot.conf import settings as askbot_settings -def can_retag_questions(user): - """Determines if a User can retag Questions.""" - if user.is_authenticated(): - if user.reputation >= askbot_settings.MIN_REP_TO_RETAG_OTHERS_QUESTIONS: - if user.reputation < askbot_settings.MIN_REP_TO_EDIT_OTHERS_POSTS: - return True - if user.is_superuser: - return True - return False - -def can_edit_post(user, post): - """Determines if a User can edit the given Question or Answer.""" - if user.is_authenticated(): - if user.id == post.author_id: - if user.is_blocked(): - return False - else: - return True - if post.wiki: - if user.reputation >= askbot_settings.MIN_REP_TO_EDIT_WIKI: - return True - if user.reputation >= askbot_settings.MIN_REP_TO_EDIT_OTHERS_POSTS: - return True - if user.is_administrator() or user.is_moderator(): - return True - return False - -def can_close_question(user, question): - """Determines if a User can close the given Question.""" - return user.is_authenticated() and ( - (user.id == question.author_id and - user.reputation >= askbot_settings.MIN_REP_TO_CLOSE_OWN_QUESTIONS) or - user.reputation >= askbot_settings.MIN_REP_TO_CLOSE_OTHERS_QUESTIONS or - user.is_superuser) - def can_lock_posts(user): """Determines if a User can lock Questions or Answers.""" return user.is_authenticated() and ( @@ -71,9 +36,6 @@ def can_accept_answer(user, question, answer): return True return False -def can_view_deleted_post(user, post): - return user.is_superuser - # user preferences view permissions def is_user_self(request_user, target_user): return (request_user.is_authenticated() and request_user == target_user) |