parsav  Diff

Differences From Artifact [31acbbce83]:

To Artifact [ca6d27c8d7]:


280
281
282
283
284
285
286

















287
288
289
290
291
292
293
	}

	self:statpage(code, body)

	body.title:free()
	body.body:free()
end


















convo.methods.assertpow = macro(function(self, pow)
	return quote
		var ok = true
		if self.aid == 0 or self.who.rights.powers.[pow:asvalue()]() == false then
			ok = false
			self:complain(403,'insufficient privileges',['you lack the <strong>'..pow:asvalue()..'</strong> power and cannot perform this action'])







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
	}

	self:statpage(code, body)

	body.title:free()
	body.body:free()
end

terra convo:confirm(title: pstring, msg: pstring, cancel: pstring)
	var conf = data.view.confirm {
		title = title;
		query = msg;
		cancel = cancel;
	}
	var ti: lib.str.acc ti:compose('confirm :: ', title)
	var body = conf:tostr() defer body:free()
	var cf = [convo.page] {
		title = ti:finalize();
		class = lib.str.plit 'query';
		body = body; cache = false;
	}
	self:stdpage(cf)
	cf.title:free()
end

convo.methods.assertpow = macro(function(self, pow)
	return quote
		var ok = true
		if self.aid == 0 or self.who.rights.powers.[pow:asvalue()]() == false then
			ok = false
			self:complain(403,'insufficient privileges',['you lack the <strong>'..pow:asvalue()..'</strong> power and cannot perform this action'])