Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge 0.12->trunk | Kim Alvefur | 2023-12-17 | 1 | -0/+4 |
|\ | |||||
| * | mod_disco: Advertise disco#info and #items on bare JIDs to fix #1664 | Kim Alvefur | 2023-12-17 | 1 | -0/+4 |
| | | | | | | | | | | | | | | | | Having to add these in *there* places seems less than ideal. I would also think that advertising disco#info is a bit redundant, since it is a requirement for everything in XMPP and if it was missing you would get an error back. | ||||
* | | plugins: Prefix module imports with prosody namespace | Kim Alvefur | 2023-03-24 | 1 | -6/+6 |
| | | |||||
* | | Switch to a new role-based authorization framework, removing is_admin() | Matthew Wild | 2022-06-15 | 1 | -4/+5 |
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | spelling: non-existing mistakes (thanks timeless)0.12.0 | Kim Alvefur | 2022-03-07 | 1 | -1/+1 |
| | |||||
* | mod_disco: Optionally return info on admin accounts to non-contacts | Kim Alvefur | 2021-04-15 | 1 | -2/+5 |
| | | | | | If you already know the account, from say the server contact info, then this confirms their admin status. | ||||
* | mod_disco: Advertise anonymous users | Kim Alvefur | 2020-07-04 | 1 | -0/+2 |
| | | | | Can these even be seen? | ||||
* | mod_disco: Advertise admin accounts as such via disco identity | Kim Alvefur | 2020-07-04 | 1 | -1/+6 |
| | |||||
* | mod_disco: Send XEP-0115 caps in s2s stream features | Kim Alvefur | 2021-08-12 | 1 | -0/+6 |
| | | | | | Not currently used for anything, but allowed and could be used in the future and might be used by other servers. | ||||
* | mod_disco: Add some spacing to improve readability and code navigation | Kim Alvefur | 2020-11-10 | 1 | -0/+4 |
| | |||||
* | mod_disco: Simplify iq handling by hooking on iq-get/ instead of iq/. | Emmanuel Gil Peyrot | 2018-08-24 | 1 | -8/+4 |
| | |||||
* | mod_disco: Skip code specific to disco on user accounts (avoids invoking ↵ | Kim Alvefur | 2018-05-28 | 1 | -0/+1 |
| | | | | usermanager, fixes #1150) | ||||
* | mod_disco: Advertise in stream-features after auth (probably what was meant ↵ | Kim Alvefur | 2017-07-27 | 1 | -1/+1 |
| | | | | in 200f1f6306a7) (fixes #957) | ||||
* | Merge 0.9->0.10 | Kim Alvefur | 2017-05-27 | 1 | -0/+1 |
|\ | |||||
| * | mod_disco: Add an account/registered identity on subscribed accounts, fixes ↵ | Emmanuel Gil Peyrot | 2017-05-27 | 1 | -0/+1 |
| | | | | | | | | #826. | ||||
* | | mod_disco: Rename variables to avoid name clash [luacheck] | Kim Alvefur | 2017-04-01 | 1 | -12/+12 |
| | | |||||
* | | Merge 0.9->0.10 | Kim Alvefur | 2017-03-24 | 1 | -1/+1 |
|\| | |||||
| * | mod_disco: Correctly set the 'node' attr (fixes #449) | Kim Alvefur | 2017-03-24 | 1 | -1/+1 |
| | | |||||
* | | plugins/various: Use type-specific config API | Kim Alvefur | 2017-03-16 | 1 | -1/+1 |
| | | |||||
* | | mod_disco: Update to account for new intermediate session type (from ↵ | Kim Alvefur | 2016-12-15 | 1 | -1/+1 |
| | | | | | | | | 9f70d35a1602) | ||||
* | | Remove all trailing whitespace | Florian Zeitz | 2013-08-09 | 1 | -1/+1 |
| | | |||||
* | | mod_disco: Check for host type == 'local' ('normal' never existed) | Matthew Wild | 2013-08-06 | 1 | -1/+1 |
| | | |||||
* | | mod_disco: Allow ansering disco requests including nodes, and adding custom ↵ | Florian Zeitz | 2013-06-04 | 1 | -8/+35 |
| | | | | | | | | items to disco#items requests | ||||
* | | mod_disco: Emit events for disco requests, which contain a node, on user ↵ | Florian Zeitz | 2013-05-17 | 1 | -4/+26 |
|/ | | | | accounts | ||||
* | hostmanager, mod_disco: Show optional 'name' option from the config in ↵ | Matthew Wild | 2012-08-05 | 1 | -2/+2 |
| | | | | disco#items queries (fixes use-case in #292) (thanks diSabler, mva) | ||||
* | mod_disco: Allow configurable name in disco identity (defaults to 'Prosody') | Matthew Wild | 2012-07-23 | 1 | -1/+1 |
| | |||||
* | core.modulemanager, mod_disco: Add support for XEP-0128: Service Discovery ↵ | Kim Alvefur | 2011-08-08 | 1 | -0/+8 |
| | | | | Extensions | ||||
* | mod_disco: Don't add caps hash to stream features on unauthenticated ↵ | Waqas Hussain | 2010-12-03 | 1 | -1/+3 |
| | | | | connections. | ||||
* | mod_disco: Fixed: Service discovery features were not being removed on ↵ | Waqas Hussain | 2010-11-28 | 1 | -0/+2 |
| | | | | module unload (issue #205). | ||||
* | mod_disco: Updated to use hostmanager.get_children instead of ↵ | Waqas Hussain | 2010-11-10 | 1 | -2/+2 |
| | | | | componentmanager.get_children. | ||||
* | mod_disco: Renamed the 'session' property of the account-disco-info and ↵ | Waqas Hussain | 2010-11-07 | 1 | -2/+2 |
| | | | | account-disco-items events to 'origin' for consistency. | ||||
* | mod_disco: Reflect requested 'node' attribute in the disco#info reply. | Waqas Hussain | 2010-07-12 | 1 | -1/+3 |
| | |||||
* | mod_disco: Respond to disco#info to the correct caps hash node ("node#ver"). | Waqas Hussain | 2010-07-11 | 1 | -1/+1 |
| | |||||
* | mod_disco: Cache disco#info reply and caps hash for host, return correct ↵ | Waqas Hussain | 2010-07-11 | 1 | -28/+38 |
| | | | | caps hash, and respond to disco#info to the caps hash node. | ||||
* | mod_disco: Support for putting the server's caps hash in stream:features to ↵ | Matthew Wild | 2010-07-09 | 1 | -8/+38 |
| | | | | allow the client to cache disco#info for the server instead of requesting it at each login. | ||||
* | Merge 0.6->0.7 | Matthew Wild | 2010-03-22 | 1 | -2/+2 |
|\ | |||||
| * | Update copyright headers for 2010 | Matthew Wild | 2010-03-22 | 1 | -2/+2 |
| | | |||||
* | | mod_disco: Added option 'disco_items' to allow appending items to a host's ↵ | Waqas Hussain | 2010-01-23 | 1 | -0/+22 |
| | | | | | | | | disco#items result. | ||||
* | | mod_disco: Handle and fire events for service discovery queries for bare ↵ | Waqas Hussain | 2009-12-21 | 1 | -0/+31 |
|/ | | | | account JIDs (thanks darkrain). | ||||
* | mod_disco: Rearranged some lines, and added a FIXME comment | Waqas Hussain | 2009-08-18 | 1 | -2/+2 |
| | |||||
* | mod_disco: Removed reference to core.discomanager | Waqas Hussain | 2009-08-18 | 1 | -1/+0 |
| | |||||
* | mod_disco: Removed legacy IQ hooks | Waqas Hussain | 2009-08-18 | 1 | -7/+0 |
| | |||||
* | mod_disco: Handle disco#items queries using new APIs | Waqas Hussain | 2009-08-18 | 1 | -0/+14 |
| | |||||
* | mod_disco: Added identity server/im with name 'Prosody' | Waqas Hussain | 2009-08-18 | 1 | -0/+1 |
| | |||||
* | mod_disco: Handle disco#info queries using new APIs | Waqas Hussain | 2009-08-18 | 1 | -2/+26 |
| | |||||
* | Remove version number from copyright headers | Matthew Wild | 2009-07-10 | 1 | -1/+1 |
| | |||||
* | mod_disco: Convert from Windows line endings | Matthew Wild | 2009-07-09 | 1 | -12/+12 |
| | |||||
* | 0.3->0.4 | Matthew Wild | 2009-03-20 | 1 | -1/+1 |
| | |||||
* | Update copyright notices for 2009 | Matthew Wild | 2009-01-30 | 1 | -2/+2 |
| | |||||
* | 0.2->0.3 | Matthew Wild | 2009-01-30 | 1 | -1/+1 |
| |