in setup.php, the definitions of the REPORTIT_USER_* constants is wrong, REPORTIT_USER_ADMIN and REPORTIT_USER_VIEWER should be inverted to be consistent with the sequence of api_plugin_register_realm calls earlier in the file.
on line 853:
@define("REPORTIT_USER_ADMIN", 100 + $ids[0]['id']);
@define("REPORTIT_USER_OWNER", 100 + $ids[1]['id']);
@define("REPORTIT_USER_VIEWER", 100 + $ids[2]['id']);
should be
@define("REPORTIT_USER_ADMIN", 100 + $ids[2]['id']);
@define("REPORTIT_USER_OWNER", 100 + $ids[1]['id']);
@define("REPORTIT_USER_VIEWER", 100 + $ids[0]['id']);