parsav  Diff

Differences From Artifact [0871cb7e85]:

To Artifact [c7ef550a1d]:


25
26
27
28
29
30
31

32
33
34
35
36
37
38
39
40
41
42
43



44
45
46
47

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
	privset = lib.set {
		'post', 'edit', 'account', 'upload', 'artifact', 'moderate', 'admin', 'invite'
	};
	powerset = lib.set {
		-- user powers -- default on
		'login', -- not locked out
		'visible', -- account & posts can be seen by others

		'post', -- can do poasts
		'shout', -- posts show up on local timeline
		'propagate', -- posts are sent to other instances
		'artifact', -- upload, claim, and manage artifacts
		'account', -- configure own account
		'edit'; -- edit own poasts
		'snitch'; -- can issue badthink reports

		-- admin powers -- default off
		'purge', -- permanently delete users
		'config', -- change daemon policy & config UI
		'censor', -- dispose of badthink



		'discipline', -- enforced timeouts, stripping badges and epithets, punitive actions that do not permanently deprive of powers; can remove own injunctions but not others'
		'vacate', -- can remove others' injunctions, but not apply them
		'cred', -- alter credentials
		'elevate', 'demote', -- change user rank, give and take powers, including the ability to log in

		'rebrand', -- modify site's brand identity
		'herald', -- grant serverwide epithets and badges
		'crier', -- can promote content to the instance page
		'invite' -- *unlimited* invites
	};
	prepmode = lib.enum {
		'full','conf','admin'
	}
}

local function setmap(set)
	local map = {}
	local struct pt { name:lib.mem.ptr(int8), val:set }
	for k,v in pairs(set.members) do
		map[#map + 1] = quote
			var ps: set ps:clear()
			(ps.[v] << true)
		in pt {name = [v], val = ps} end
	end
	return map
end







>





<



<
<

>
>
>




>

<
|
<









|







25
26
27
28
29
30
31
32
33
34
35
36
37

38
39
40


41
42
43
44
45
46
47
48
49
50

51

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
	privset = lib.set {
		'post', 'edit', 'account', 'upload', 'artifact', 'moderate', 'admin', 'invite'
	};
	powerset = lib.set {
		-- user powers -- default on
		'login', -- not locked out
		'visible', -- account & posts can be seen by others
		'edit'; -- edit own poasts
		'post', -- can do poasts
		'shout', -- posts show up on local timeline
		'propagate', -- posts are sent to other instances
		'artifact', -- upload, claim, and manage artifacts
		'account', -- configure own account

		'snitch'; -- can issue badthink reports

		-- admin powers -- default off


		'censor', -- dispose of badthink
		'herald', -- grant serverwide epithets and badges
		'crier', -- can promote content to the instance page
		'invite', -- *unlimited* invites
		'discipline', -- enforced timeouts, stripping badges and epithets, punitive actions that do not permanently deprive of powers; can remove own injunctions but not others'
		'vacate', -- can remove others' injunctions, but not apply them
		'cred', -- alter credentials
		'elevate', 'demote', -- change user rank, give and take powers, including the ability to log in
		'config', -- change daemon policy & config UI
		'rebrand', -- modify site's brand identity

		'purge' -- permanently delete users

	};
	prepmode = lib.enum {
		'full','conf','admin'
	}
}

local function setmap(set)
	local map = {}
	local struct pt { name:lib.mem.ptr(int8), val:set }
	for i,v in ipairs(set.members) do
		map[#map + 1] = quote
			var ps: set ps:clear()
			(ps.[v] << true)
		in pt {name = [v], val = ps} end
	end
	return map
end