1 (edited by lamagra 2017-11-23 17:47:40)

Topic: Admins under domain

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7
- Linux/BSD distribution name and version: Debian 9.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes: 2.8.0
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi,
i'v got one small problem with admin under domain. When I choose on IredAdmin panel "Admins" then it shows all admins assigned to domains and this is ok.
But when I choose some domain and click on admins under this domain then it shows me a list of account but they are not assigned to choosen domain. Bug?

Second problem. When I choose on panel "Admins" some admin account i don't see which domains are assigned to this account but when i choose some domain directly then i see this account in admin section.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Admins under domain

lamagra wrote:

But when I choose some domain and click on admins under this domain then it shows me a list of account but they are not assigned to choosen domain. Bug?

According to your description, it might be a bug. But need to steadily reproduce it first.
But are those "unexpected" admins the global admins?

lamagra wrote:

Second problem. When I choose on panel "Admins" some admin account i don't see which domains are assigned to this account but when i choose some domain directly then i see this account in admin section.

I'm sorry it's hard to understand the issue with this description. Could you please help capture some screenshot to help us better understand the issue?

3 (edited by lamagra 2017-11-30 01:41:22)

Re: Admins under domain

ZhangHuangbin wrote:
lamagra wrote:

But when I choose some domain and click on admins under this domain then it shows me a list of account but they are not assigned to choosen domain. Bug?

According to your description, it might be a bug. But need to steadily reproduce it first.
But are those "unexpected" admins the global admins?

No they aren't global admins. Now i cleared this list of fake admins by edit every of them and turn on "domain admin" option and turn off again.

ZhangHuangbin wrote:
lamagra wrote:

Second problem. When I choose on panel "Admins" some admin account i don't see which domains are assigned to this account but when i choose some domain directly then i see this account in admin section.

I'm sorry it's hard to understand the issue with this description. Could you please help capture some screenshot to help us better understand the issue?

OK.
Example admin: adrian.blank@domain.pl
example domain: domain.pl
In section Admins looks ok, adrian is on list of all admins
https://forum.iredmail.org/misc.php?act … download=1
but if you go to details of account adrian we will see this
https://forum.iredmail.org/misc.php?act … download=1
it seems that "domain admin" for this account it's on but no domains are assigned - but this is not true.
when we go to details of domain.pl we will see this
https://forum.iredmail.org/misc.php?act … download=1
I hope this is understandable now...

Post's attachments

Screenshot_20171129_180444.png
Screenshot_20171129_180444.png 32.01 kb, 3 downloads since 2017-11-29 

Screenshot_20171129_180604.png
Screenshot_20171129_180604.png 17.99 kb, 1 downloads since 2017-11-29 

Screenshot_20171129_180643.png
Screenshot_20171129_180643.png 46.53 kb, 1 downloads since 2017-11-29 

You don't have the permssions to download the attachments of this post.

4

Re: Admins under domain

Could you please show us some SQL records for troubleshooting?

USE vmail;
SELECT username, domain, active FROM domain_admins WHERE username='adrian.blank@domain.pl' \G
SELECT username, domain, active, isadmin, isglobaladmin FROM mailbox WHERE username='adrian.blank@domain.pl' \G

5

Re: Admins under domain

ZhangHuangbin wrote:

Could you please show us some SQL records for troubleshooting?

USE vmail;
SELECT username, domain, active FROM domain_admins WHERE username='adrian.blank@domain.pl' \G
SELECT username, domain, active, isadmin, isglobaladmin FROM mailbox WHERE username='adrian.blank@domain.pl' \G

SELECT username, domain, active FROM domain_admins WHERE username='adrian.blank@domain.pl' \G

MariaDB [vmail]> SELECT username, domain, active FROM domain_admins WHERE username='adrian.blank@domain.pl' \G
*************************** 1. row ***************************
username: adrian.blank@domain.pl
  domain: domain.pl
  active: 1
*************************** 2. row ***************************
username: adrian.blank@domain.pl
  domain: domain2.pl
  active: 1
*************************** 3. row ***************************
username: adrian.blank@domain.pl
  domain: domain3.pl
  active: 1
*************************** 4. row ***************************
username: adrian.blank@domain.pl
  domain: domain4.pl
  active: 1
*************************** 5. row ***************************
username: adrian.blank@domain.pl
  domain: domain5.pl
  active: 1
*************************** 6. row ***************************
username: adrian.blank@domain.pl
  domain: domain6.pl
  active: 1
*************************** 7. row ***************************
username: adrian.blank@domain.pl
  domain: domain7.pl
  active: 1
*************************** 8. row ***************************
username: adrian.blank@domain.pl
  domain: domain8.pl
  active: 1
8 rows in set (0.00 sec)


SELECT username, domain, active, isadmin, isglobaladmin FROM mailbox WHERE username='adrian.blank@domain.pl' \G

*************************** 1. row ***************************
     username: adrian.blank@domain.pl
       domain: domain.pl
       active: 1
      isadmin: 1
isglobaladmin: 0
1 row in set (0.00 sec)

6

Re: Admins under domain

All sql records look fine. Is it possible to give me direct ssh access for debugging? If ok, contact me: zhb _at_ iredmail _dot_ org

7

Re: Admins under domain

Confirmed it's a bug and fixed. The fix will be available in upcoming iRedAdmin-Pro release.