short rights = item.checkRights((short) ~0, getAuthenticatedAccount());
short rights = item.checkRights((short) ~0, getAuthenticatedAccount(), isUsingAdminPrivileges());
    public synchronized short getEffectivePermissions(OperationContext octxt, int itemId, byte type) throws ServiceException {        // fetch the item outside the transaction so we get it even if the        //   authenticated user doesn't have read permissions on it        MailItem item = getItemById(null, itemId, type);        boolean success = false;        try {            beginTransaction("getEffectivePermissions", octxt);            // use ~0 to query *all* rights; may need to change this when we do negative rights            short rights = item.checkRights((short) ~0, getAuthenticatedAccount());            success = true;            return rights;        } finally {            endTransaction(success);        }    }