First time here? Check out the FAQ!
0

How can I change Askbot so it sends Feedback emails to superusers but not staff?
 

The title says it all. Django has a superuser and staff role, in contrib.auth.models.User.

In my other app (running on the same db), I have some staff member because I need them to access a certain admin page, but I don't want them to receive Askbot's feedback emails :)

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
siovene's avatar
431
siovene
asked 12 years ago, updated 12 years ago

Comments

What is the difference between admins and staff? Not sure.

Evgeny's avatar Evgeny (12 years ago)

A superuser is one who can do EVERYTHING, had all permissions by default. A staff member can access to the admin site, but can only do things he has permissions for (see permissions in contrib.auth.User)

siovene's avatar siovene (12 years ago)

Right now moderators (User.status = 'm' as you found) and administrators receive feedback by design. We did not make distinction between staff and the admin in askbot.

Evgeny's avatar Evgeny (12 years ago)
see more comments

1 Answer

0

I've found out how. Feedback emails are emailed to "moderators", in askbot/mail/__init__.py.

Moderators are those with status == 'm' in in contrib.auth.models.User (ah, so this is how Askbot monkey patches User :-)).

I just needed to change that to 'a' (approved) and the problem went away.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
siovene's avatar
431
siovene
answered 12 years ago
link

Comments

see more comments