Add MineGeo gameplay systems and interface
This commit is contained in:
@@ -15,7 +15,7 @@ begin
|
||||
select id into fourth from auth.users where id not in (owner,moderator,reporter,second,third) order by id limit 1;
|
||||
if fourth is null then raise exception 'Six fixture accounts are required'; end if;
|
||||
insert into public.profiles(id) values(owner),(moderator),(reporter),(second),(third),(fourth) on conflict(id) do nothing;
|
||||
update public.profiles set role='moderator' where id=moderator;
|
||||
update public.profiles set role='admin' where id=moderator;
|
||||
update public.profiles set role='contributor' where id in (owner,reporter,second,third,fourth);
|
||||
insert into public.datasets(owner_id,name,source,bounds,state,panorama_count)
|
||||
values(owner,'Report regression','plugin','{"minX":0,"minZ":0,"maxX":64,"maxZ":64}','published',5) returning id into fixture;
|
||||
@@ -38,7 +38,7 @@ begin
|
||||
begin
|
||||
perform public.review_content_report(report,owner,'confirm','Confirmed by the map owner.');
|
||||
raise exception 'Unauthorized moderator succeeded';
|
||||
exception when others then if sqlerrm<>'Moderator permission required' then raise; end if; end;
|
||||
exception when others then if sqlerrm<>'Admin permission required' then raise; end if; end;
|
||||
perform public.review_content_report(report,moderator,'dismiss','The reported terrain looks correct.');
|
||||
if (select report_strikes from public.datasets where id=fixture)<>0 then raise exception 'Dismissed report added a strike'; end if;
|
||||
report:=public.submit_content_report(fixture,reporter,revision,null,'spam','The map contains inappropriate advertisements.');
|
||||
|
||||
Reference in New Issue
Block a user