mod_http_admin_api/mod_http_admin_api.lua
changeset 5891 2aa66e928aa0
parent 5887 6c11e1b4066d
child 5892 432efc39572f
equal deleted inserted replaced
5890:2c85397d7241 5891:2aa66e928aa0
   151 		if not options.groups then
   151 		if not options.groups then
   152 			return 400;
   152 			return 400;
   153 		end
   153 		end
   154 		invite = invites.create_group(options.groups, {
   154 		invite = invites.create_group(options.groups, {
   155 			source = source;
   155 			source = source;
       
   156 			roles = options.roles;
   156 		}, options.ttl);
   157 		}, options.ttl);
   157 	elseif invite_type == "account" then
   158 	elseif invite_type == "account" then
   158 		invite = invites.create_account(options.username, {
   159 		invite = invites.create_account(options.username, {
   159 			source = source;
   160 			source = source;
   160 			groups = options.groups;
   161 			groups = options.groups;
       
   162 			roles = options.roles;
   161 		}, options.ttl);
   163 		}, options.ttl);
   162 	else
   164 	else
   163 		return 400;
   165 		return 400;
   164 	end
   166 	end
   165 	if not invite then
   167 	if not invite then