Annotate

core/features.lua @ 12994:5625da6ae6b6

moduleapi: may: Fail early if a local session has no role assigned We expect every session to explicitly have a role assigned. Falling back to any kind of "default" role (even the user's default role) in the absence of an explicit role could open up the possibility of accidental privilege escalation.
author Matthew Wild <mwild1@gmail.com>
date Sat, 25 Mar 2023 19:38:41 +0000
parent 12972:ead41e25ebc0
child 13111:8576f94ac90a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12972
ead41e25ebc0 core: Prefix module imports with prosody namespace
Kim Alvefur <zash@zash.se>
parents: 12957
diff changeset
1 local set = require "prosody.util.set";
12252
4bfe658415a0 core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2
4bfe658415a0 core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 return {
4bfe658415a0 core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 available = set.new{
4bfe658415a0 core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5 -- mod_bookmarks bundled
4bfe658415a0 core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 "mod_bookmarks";
12655
a5a0783e9241 features: Add "permissions" feature for role-auth
Matthew Wild <mwild1@gmail.com>
parents: 12252
diff changeset
7 -- Roles, module.may and per-session authz
a5a0783e9241 features: Add "permissions" feature for role-auth
Matthew Wild <mwild1@gmail.com>
parents: 12252
diff changeset
8 "permissions";
12955
d32926897ca4 core.features: Add feature for prosody.loader
Kim Alvefur <zash@zash.se>
parents: 12655
diff changeset
9 -- prosody.* namespace
d32926897ca4 core.features: Add feature for prosody.loader
Kim Alvefur <zash@zash.se>
parents: 12655
diff changeset
10 "loader";
12957
e625ad5a9889 features: Add "keyval+"
Matthew Wild <mwild1@gmail.com>
parents: 12955
diff changeset
11 -- "keyval+" store
e625ad5a9889 features: Add "keyval+"
Matthew Wild <mwild1@gmail.com>
parents: 12955
diff changeset
12 "keyval+";
12252
4bfe658415a0 core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 };
4bfe658415a0 core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
14 };