askbot.auth

Authorisation related functions.

The actions a User is authorised to perform are dependent on their reputation and superuser status.

askbot.auth.calculate_reputation(origin, offset)
askbot.auth.can_accept_answer(user, question, answer)
askbot.auth.can_add_comments(user, subject)

Determines if a User can add comments to Questions and Answers.

askbot.auth.can_close_question(user, question)

Determines if a User can close the given Question.

askbot.auth.can_delete_comment(user, comment)

Determines if a User can delete the given Comment.

askbot.auth.can_delete_post(user, post)
askbot.auth.can_edit_post(user, post)

Determines if a User can edit the given Question or Answer.

askbot.auth.can_flag_offensive(user)

Determines if a User can flag Questions and Answers as offensive.

askbot.auth.can_follow_url(user)

Determines if the URL link can be followed by Google search engine.

askbot.auth.can_lock_posts(user)

Determines if a User can lock Questions or Answers.

askbot.auth.can_moderate_users(user)
askbot.auth.can_reopen_question(user, question)
askbot.auth.can_retag_questions(user)

Determines if a User can retag Questions.

askbot.auth.can_upload_files(request_user)
askbot.auth.can_view_deleted_post(user, post)
askbot.auth.can_view_offensive_flags(user)

Determines if a User can view offensive flag counts.

askbot.auth.can_view_user_edit(request_user, target_user)
askbot.auth.can_view_user_preferences(request_user, target_user)
askbot.auth.can_view_user_votes(request_user, target_user)
askbot.auth.can_vote_down(user)

Determines if a User can vote Questions and Answers down.

askbot.auth.can_vote_up(user)

Determines if a User can vote Questions and Answers up.

askbot.auth.is_user_self(request_user, target_user)
askbot.auth.onAnswerAccept(*args, **kw)
askbot.auth.onAnswerAcceptCanceled(*args, **kw)
askbot.auth.onDeleteCanceled(post, user, timestamp=None)
askbot.auth.onDeleted(post, user, timestamp=None)
askbot.auth.onDownVoted(*args, **kw)
askbot.auth.onDownVotedCanceled(*args, **kw)
askbot.auth.onFlaggedItem(*args, **kw)
askbot.auth.onUpVoted(*args, **kw)
askbot.auth.onUpVotedCanceled(*args, **kw)

This Page