Skip to main content
Topic: reply by email thinks admin account don't have permission (Read 2280 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

reply by email thinks admin account don't have permission

Hi,

I got the post by email feature setup using IMAP and it seems to work except that emails get rejected.

Using the admin account I replied to a topic but got:
"Failure Reason: The poster does not have post by email permissions on this board"

How is that possible? Shouldn't the admin account have all permissions? Also I enabled the permission for the regular user group.

Re: reply by email thinks admin account don't have permission

Reply #1

Thats a bug that I fixed in 1.1, and should be backported to 1.0.8

In /controllers/Emailpost.controller.php
Code: (find) [Select]
	// Validate they have permission to reply
$becomesApproved = true;
if (!in_array('postby_email', $pbe['user_info']['permissions']))

Code: (replace) [Select]
	// Validate they have permission to reply
$becomesApproved = true;
if (!in_array('postby_email', $pbe['user_info']['permissions']) && !$pbe['user_info']['admin'])



Re: reply by email thinks admin account don't have permission

Reply #2

OK... I put your fix manually but it didn't seem to fix the problem. I tried again with same result.

Re: reply by email thinks admin account don't have permission

Reply #3

That is the only line that I know of that would generate that specific error, and the edit would bypass the check for an admin user.

There is a similar line in the function pbe_create_topic  but be sure to edit the one in the function pbe_create_post (its the only one with the comment I provided).

Does it work from a "normal" user that has permissions and just an admin user has a problem?


Re: reply by email thinks admin account don't have permission

Reply #4

Just confirmed that it works from a normal user. Checked again that admin user doesn't work.

Re: reply by email thinks admin account don't have permission

Reply #5

Maybe is:
Code: [Select]
$pbe['user_info']['is_admin']
just a wild guess based on the usual way $user_info is filled. :)
Bugs creator.
Features destroyer.
Template killer.

Re: reply by email thinks admin account don't have permission

Reply #6

You are correct Sir. That fixed the problem. Thanks!

Re: reply by email thinks admin account don't have permission

Reply #7

 emanuele fixed a bug by Spuds! :P
Bugs creator.
Features destroyer.
Template killer.

Re: reply by email thinks admin account don't have permission

Reply #8

Nonsense ... that was just a typo :P (but you may want to fix that in 1.1 where I made the typo in my cough "fix"  O:-)

 

Re: reply by email thinks admin account don't have permission

Reply #9

Fixed in 822d43c65472cd131ff8c3b9336075497b7ac602 :D
Bugs creator.
Features destroyer.
Template killer.