changeset 4378:d4e0e4d22fc7

mod_http_admin_api: Add 'reset' property to returned invite objects Indicates the invite is for a password reset.
author Matthew Wild <mwild1@gmail.com>
date Sat, 23 Jan 2021 13:03:14 +0000
parents a0f1fb5e7829
children 950abc6c67b8
files mod_http_admin_api/mod_http_admin_api.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua	Sat Jan 23 12:56:17 2021 +0000
+++ b/mod_http_admin_api/mod_http_admin_api.lua	Sat Jan 23 13:03:14 2021 +0000
@@ -65,6 +65,7 @@
 	local additional_data = token_info.additional_data;
 	local groups = additional_data and additional_data.groups or nil;
 	local source = additional_data and additional_data.source or nil;
+	local reset = not not (additional_data and additional_data.allow_reset or nil);
 	return {
 		id = token_info.token;
 		type = token_info.type;
@@ -77,6 +78,7 @@
 		expires = token_info.expires;
 		groups = groups;
 		source = source;
+		reset = reset;
 	};
 end