Convert example config to use new syntax for access rules

This commit is contained in:
Paweł Chmielowski 2016-05-26 10:37:00 +02:00
parent 1981e13326
commit 9e68c4c0d9
1 changed files with 50 additions and 28 deletions

View File

@ -462,54 +462,76 @@ acl:
## - "bob-local": "localhost" ## - "bob-local": "localhost"
###. ============ ###. ============
###' ACCESS RULES ###' SHAPER RULES
access:
shaper_rules:
## Maximum number of simultaneous sessions allowed for a single user: ## Maximum number of simultaneous sessions allowed for a single user:
max_user_sessions: max_user_sessions:
all: 10 - 10:
- all
## Maximum number of offline messages that users can have: ## Maximum number of offline messages that users can have:
max_user_offline_messages: max_user_offline_messages:
admin: 5000 - 5000:
all: 100 - acl: admin
## This rule allows access only for local users: - 100:
local: - all
local: allow
## Only non-blocked users can use c2s connections:
c2s:
blocked: deny
all: allow
## For C2S connections, all users except admins use the "normal" shaper ## For C2S connections, all users except admins use the "normal" shaper
c2s_shaper: c2s_shaper:
admin: none - none:
all: normal - acl: admin
- normal:
- all
## All S2S connections use the "fast" shaper ## All S2S connections use the "fast" shaper
s2s_shaper: s2s_shaper:
all: fast - fast:
- all
###. ============
###' ACCESS RULES
access_rules:
## This rule allows access only for local users:
local:
- allow:
- acl: local
## Only non-blocked users can use c2s connections:
c2s:
- deny:
- acl: blocked
- allow:
- all
## Only admins can send announcement messages: ## Only admins can send announcement messages:
announce: announce:
admin: allow - allow:
- acl: admin
## Only admins can use the configuration interface: ## Only admins can use the configuration interface:
configure: configure:
admin: allow - allow:
- acl: admin
## Admins of this server are also admins of the MUC service: ## Admins of this server are also admins of the MUC service:
muc_admin: muc_admin:
admin: allow - allow:
- acl: admin
## Only accounts of the local ejabberd server can create rooms: ## Only accounts of the local ejabberd server can create rooms:
muc_create: muc_create:
local: allow - allow:
- acl: local
## All users are allowed to use the MUC service: ## All users are allowed to use the MUC service:
muc: muc:
all: allow - allow:
- all
## Only accounts on the local ejabberd server can create Pubsub nodes: ## Only accounts on the local ejabberd server can create Pubsub nodes:
pubsub_createnode: pubsub_createnode:
local: allow - allow:
- acl: local
## In-band registration allows registration of any possible username. ## In-band registration allows registration of any possible username.
## To disable in-band registration, replace 'allow' with 'deny'. ## To disable in-band registration, replace 'allow' with 'deny'.
register: register:
all: allow - allow:
- all
## Only allow to register from localhost ## Only allow to register from localhost
trusted_network: trusted_network:
loopback: allow - allow:
- acl: loopback
## Do not establish S2S connections with bad servers ## Do not establish S2S connections with bad servers
## s2s: ## s2s:
## bad_servers: deny ## bad_servers: deny