Differences From
Artifact [8e095d7d59]:
1225 1225 local schema = sqlsquash(lib.util.ingest 'backend/schema/pgsql.sql')
1226 1226 local obliterator = sqlsquash(lib.util.ingest 'backend/schema/pgsql-drop.sql')
1227 1227
1228 1228 local privupdate = terra(
1229 1229 src: &lib.store.source,
1230 1230 ac: &lib.store.actor
1231 1231 ): {}
1232 - var pdef: lib.store.powerset pdef:clear()
1232 + var pdef = lib.store.rights_default().powers
1233 1233 var map = array([privmap])
1234 1234 for i=0, [map.type.N] do
1235 1235 var d = pdef and map[i].val
1236 1236 var u = ac.rights.powers and map[i].val
1237 1237 queries.actor_power_delete.exec(src, ac.id, map[i].name)
1238 - if d:sz() > 0 and u:sz() == 0 then
1238 + if d:any() and u:sz() == 0 then
1239 1239 lib.dbg('blocking power ', {map[i].name.ptr, map[i].name.ct})
1240 1240 queries.actor_power_insert.exec(src, ac.id, map[i].name, 0)
1241 - elseif d:sz() == 0 and u:sz() > 0 then
1241 + elseif d:any() == false and u:sz() > 0 then
1242 1242 lib.dbg('granting power ', {map[i].name.ptr, map[i].name.ct})
1243 1243 queries.actor_power_insert.exec(src, ac.id, map[i].name, 1)
1244 1244 end
1245 1245 end
1246 1246 end
1247 1247
1248 1248 local getpow = terra(