parsav  Diff

Differences From Artifact [0871cb7e85]:

To Artifact [c7ef550a1d]:


    25     25   	privset = lib.set {
    26     26   		'post', 'edit', 'account', 'upload', 'artifact', 'moderate', 'admin', 'invite'
    27     27   	};
    28     28   	powerset = lib.set {
    29     29   		-- user powers -- default on
    30     30   		'login', -- not locked out
    31     31   		'visible', -- account & posts can be seen by others
           32  +		'edit'; -- edit own poasts
    32     33   		'post', -- can do poasts
    33     34   		'shout', -- posts show up on local timeline
    34     35   		'propagate', -- posts are sent to other instances
    35     36   		'artifact', -- upload, claim, and manage artifacts
    36     37   		'account', -- configure own account
    37         -		'edit'; -- edit own poasts
    38     38   		'snitch'; -- can issue badthink reports
    39     39   
    40     40   		-- admin powers -- default off
    41         -		'purge', -- permanently delete users
    42         -		'config', -- change daemon policy & config UI
    43     41   		'censor', -- dispose of badthink
           42  +		'herald', -- grant serverwide epithets and badges
           43  +		'crier', -- can promote content to the instance page
           44  +		'invite', -- *unlimited* invites
    44     45   		'discipline', -- enforced timeouts, stripping badges and epithets, punitive actions that do not permanently deprive of powers; can remove own injunctions but not others'
    45     46   		'vacate', -- can remove others' injunctions, but not apply them
    46     47   		'cred', -- alter credentials
    47     48   		'elevate', 'demote', -- change user rank, give and take powers, including the ability to log in
           49  +		'config', -- change daemon policy & config UI
    48     50   		'rebrand', -- modify site's brand identity
    49         -		'herald', -- grant serverwide epithets and badges
    50         -		'crier', -- can promote content to the instance page
    51         -		'invite' -- *unlimited* invites
           51  +		'purge' -- permanently delete users
    52     52   	};
    53     53   	prepmode = lib.enum {
    54     54   		'full','conf','admin'
    55     55   	}
    56     56   }
    57     57   
    58     58   local function setmap(set)
    59     59   	local map = {}
    60     60   	local struct pt { name:lib.mem.ptr(int8), val:set }
    61         -	for k,v in pairs(set.members) do
           61  +	for i,v in ipairs(set.members) do
    62     62   		map[#map + 1] = quote
    63     63   			var ps: set ps:clear()
    64     64   			(ps.[v] << true)
    65     65   		in pt {name = [v], val = ps} end
    66     66   	end
    67     67   	return map
    68     68   end