Commit Graph

17 Commits

Author SHA1 Message Date
Evgeniy Khramtsov b82b93f8f0 Don't validate an option in ejabberd_config:get_option() functions
The commit introduces the following changes:
* Now there is no need to pass validating function in
  ejabberd_config:get_option() functions, because the configuration
  keeps already validated values.
* New function ejabberd_config:get_option/1 is introduced
* Function ejabberd_config:get_option/3 is deprecated. If the function
  is still called, the second argument (validating function) is simply
  ignored.
* The second argument for ejabberd_config:get_option/2 is now
  a default value, not a validating function.
2017-04-29 11:39:40 +03:00
Paweł Chmielowski ce3317da7a Fix bug in api_permission parsing 2017-02-28 13:36:34 +01:00
Paweł Chmielowski b2e16ffb12 Fix parsing of acl/access rules inside oauth sections of api_permissions
This should fix problem reported in #1568
2017-02-27 20:23:37 +01:00
Evgeniy Khramtsov d523357ba8 Invalidate access permissions on configuration reload 2017-02-27 09:55:54 +03:00
Paweł Chmielowski b703b4f022 Don't shadow binding in match 2017-02-06 11:38:51 +01:00
Paweł Chmielowski af5457ba09 Make sure that api_permissions always have "console commands" section
If user didn't override it in config file, default version which allows
executing all commands will be added
2017-02-03 15:22:35 +01:00
Paweł Chmielowski ce42b6be01 Add example api_permisions: definition to config template
Also expand default config to have rule for admin oauth
2017-01-13 16:53:48 +01:00
Badlop 5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00
Paweł Chmielowski a50247c20d Improve handling on acl rules in api_permissions 2016-12-08 18:08:54 +01:00
Paweł Chmielowski a3b12fd745 Recognize "- who:" not only "who:" syntax in api_permissions 2016-12-08 12:01:24 +01:00
Evgeniy Khramtsov 49f1275e20 Get rid of excessive (io)list_to_binary/1 calls 2016-11-24 15:06:06 +03:00
Paweł Chmielowski fd6f0f94b5 Convert ejabberd_xmlrpc to new api_permissions 2016-10-14 13:55:50 +02:00
Holger Weiss d701230555 Make map syntax compatible with Erlang/OTP 17 2016-10-07 00:36:47 +02:00
Paweł Chmielowski b01fbfadf3 Use correct field for oauth scope 2016-10-06 11:03:26 +02:00
Paweł Chmielowski 438dbc8bda Make handling of oauth clauses be more consistent with other rules 2016-10-06 10:59:43 +02:00
Paweł Chmielowski 8accb8ee0c Use proper default value for api_permissions 2016-10-06 10:59:43 +02:00
Paweł Chmielowski 98e0123ca4 New api permissions framework 2016-10-05 13:21:11 +02:00