Do not overload the acl

Hello! There is a problem and we can not understand or a bug, or that we did not do correctly. And so we have Jaber version 16.03. And we add a user to the rule blocked: user. Then we do reload_config using ejabberdctl. The settings are re-read, and the user can not connect over. But if we remove the user from the rules, and do reload_config the user can not connect. The only way that a user would be able to connect again to do a full restart ejabberd service. What could be the problem or is it the way it should work.

When ejabberd is started, it

When ejabberd is started, it has the ACL list empty, then it reads the config file and loads into memory.

When you call reload_config, it reads the config file and loads into memory, overwritting existing data. As you noticed, old ACLs are overwritten, but not deleted: the list isn't empty.

I see no way to tell reload_config to not overload, or to remove config in memory before reading it.

There is a solution: you must be explicit, for example:
First you block him:

acl:
  blocked:
    user:
      - "user2@localhost"
      - "test"

access_rules:
  c2s:
    - deny: blocked
    - allow

Later you want to allow again, without restart:

acl:
  unblocked:
    user:
      - "user2@localhost"
  blocked:
    user:
      - "test"

access_rules:
  c2s:
    - allow: unblocked
    - deny: blocked
    - allow

Thank you so much

Thank you so much

Syndicate content