core/features.lua
author Matthew Wild <mwild1@gmail.com>
Fri, 07 Oct 2022 17:01:35 +0100
changeset 12752 7b9de8109a90
parent 12659 a5a0783e9241
child 12959 d32926897ca4
permissions -rw-r--r--
util.roles: Add a :policies() method to iterate through available policies We don't expose the policies directly, to force people to go through :may(). However, there are times when we really just need to know what policies a role has inside it (e.g. for reporting or debugging purposes).

local set = require "util.set";

return {
	available = set.new{
		-- mod_bookmarks bundled
		"mod_bookmarks";
		-- Roles, module.may and per-session authz
		"permissions";
	};
};