| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Gives some access to node details which are otherwise hard to determine
if you only see the plain text summary, since it is shared based on the
pubsub#type setting (or payload xmlns).
|
|
|
|
|
|
|
| |
Many of these fall into a few categories:
- util.cache size, must be >= 1
- byte or item counts that logically can't be negative
- port numbers that should be in 1..0xffff
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This matches ejabberd's behaviour, using the 'pubsub#itemreply' config option.
Although the current definition of this option in the specification is not
as clear as it could be, I think matching what existing deployments do is the
best option to resolve the ambiguity and reduce fragmentation.
We should update the spec to be clearer about how to use and interpret this
option.
The 'expose_publisher' option for mod_pubsub is now an override (always expose
or never expose). If unset, it will use the per-node config (which defaults to
not exposing).
Thanks to Link Mauve, edhelas and goffi for sparking this feature.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We began moving away from simple "is this user an admin?" permission checks
before 0.12, with the introduction of mod_authz_internal and the ability to
dynamically change the roles of individual users.
The approach in 0.12 still had various limitations however, and apart from
the introduction of roles other than "admin" and the ability to pull that info
from storage, not much actually changed.
This new framework shakes things up a lot, though aims to maintain the same
functionality and behaviour on the surface for a default Prosody
configuration. That is, if you don't take advantage of any of the new
features, you shouldn't notice any change.
The biggest change visible to developers is that usermanager.is_admin() (and
the auth provider is_admin() method) have been removed. Gone. Completely.
Permission checks should now be performed using a new module API method:
module:may(action_name, context)
This method accepts an action name, followed by either a JID (string) or
(preferably) a table containing 'origin'/'session' and 'stanza' fields (e.g.
the standard object passed to most events). It will return true if the action
should be permitted, or false/nil otherwise.
Modules should no longer perform permission checks based on the role name.
E.g. a lot of code previously checked if the user's role was prosody:admin
before permitting some action. Since many roles might now exist with similar
permissions, and the permissions of prosody:admin may be redefined
dynamically, it is no longer suitable to use this method for permission
checks. Use module:may().
If you start an action name with ':' (recommended) then the current module's
name will automatically be used as a prefix.
To define a new permission, use the new module API:
module:default_permission(role_name, action_name)
module:default_permissions(role_name, { action_name[, action_name...] })
This grants the specified role permission to execute the named action(s) by
default. This may be overridden via other mechanisms external to your module.
The built-in roles that developers should use are:
- prosody:user (normal user)
- prosody:admin (host admin)
- prosody:operator (global admin)
The new prosody:operator role is intended for server-wide actions (such as
shutting down Prosody).
Finally, all usage of is_admin() in modules has been fixed by this commit.
Some of these changes were trickier than others, but no change is expected to
break existing deployments.
EXCEPT: mod_auth_ldap no longer supports the ldap_admin_filter option. It's
very possible nobody is using this, but if someone is then we can later update
it to pull roles from LDAP somehow.
|
| |
|
|
|
|
|
| |
Enables generation of summaries for more than Atom without additional
modules.
|
| |
|
|
|
|
|
|
| |
Allows using different ones even if multiple semantically different
formats share the same root element xmlns, e.g. generic Atom and
XEP-0277 entries.
|
|
|
|
|
| |
Previously this would end up passing the "max" directly to the
underlying storage.
|
|
|
|
|
| |
This allows overriding it in cases where it is not equal to module.host,
like say, in mod_pep
|
|
|
|
|
|
| |
Clients would generally be using the "max" symbol instead of discovering
this, but this also gets us validation and earlier rejection of out of
bounds values.
|
|
|
|
|
|
|
|
|
| |
This would also release any resources held via references from these
callbacks.
I'm not sure why we don't just re-new() the whole thing.
Related to #1382
|
|
|
|
|
|
| |
Because of the way the previous pubsub service is carried access module
reloads, it would retain the configuration options with their previous
values from when the service was first created.
|
|
|
|
|
| |
Maybe the 'service' in the outer scope should be moved down to minimize
overlap with other functions that receive the same service as argument?
|
|
|
|
|
|
| |
Since nodes were always persistent according to the XEP-0060 definition.
Whether data is stored in memory or on disk was not what this setting
was meant for.
|
|
|
|
|
| |
The publisher is already there on the item when the broadcaster gets it,
so it needs to do the opposite thing.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All the XEP-0060 examples have the publisher attribute set to a bare
JID, but the text does allow it to be the full JID.
Since mod_pubsub is more likely used for open nodes that anyone can
subscribe to it makes sense to not leak the full JIDs. This is also
disabled by defaults.
In mod_pep on the other hand it might make sense to have the full JID
since that data is more likely to be broadcast to contacts which are
already somewhat trusted.
|
| |
|
|
|
|
|
|
| |
Fixes #1643
API change: The argument to archive_itemstore() changes type to integer
|
|\ |
|
| | |
|
|\ \
| |/
|/| |
|
| | |
|
| |\ |
|
| | |
| | |
| | |
| | | |
This code has moved but the comment did not follow it.
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | | |
Also makes it easier to compare with mod_pep
|
| | | | |
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | | |
in order to avoid conflict with a handler at the default (0) priority,
making it easier to write your own formatting in plugins.
this follows the common pattern of default modules having lower priority
|
| |/
|/| |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
| |
The 'publisher' is only on <item> in the schema.
|
|
|
|
| |
broadcast
|
|
|
|
|
|
|
|
| |
This moves some XEP-0060 awkwardness out of util.pubsub and into mod_pubsub
A retraction is broadcast in an <items> container, whereas most other
kinds of broadcasts are in a container with a name matching the 'kind'
attribute.
|
|
|
|
| |
util.pubsub to avoid duplication
|
|
|
|
|
|
| |
unsubscribed but nothing else
Can't revoke their subscriptions on change of access model otherwise
|
|
|
|
|
|
| |
Like ca5228a7d907 did for mod_pep
Thanks pep.
|
|
|
|
| |
There is already a set_service()
|
| |
|
|
|
|
|
| |
'presence' and 'roster' makes more sense for PEP
'auithorize' needs additional code for authorization flow
|
|
|
|
| |
Like aefb96a52f5f
|
|
|
|
| |
extensibility
|
| |
|
| |
|