╭ changed ─────────╮ │src/event/Repo.zig│ ╰──────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────╮ │10 write_access: Access = .private, │ │11 read_user_ids: []const u8 = "", │ │12 write_user_ids: []const u8 = "", │ │13 +// collaborators who hold the owner's role without being the creator │ │14 +owner_user_ids: []const u8 = "", │ │15 │ │16 // what the db stores: the event's data plus the commit-derived fields│ │17 pub const Record = struct { │ ╰──────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │65 if (std.mem.eql(u8, event.user_id, &user_id)) return .owner; │ │66 │ │67 const user_id_hex = std.fmt.bytesToHex(user_id, .lower); │ │68 + if (containsUserId(event.owner_user_ids, &user_id_hex)) return .owner; │ │69 if (base == .write or containsUserId(event.write_user_ids, &user_id_hex)) return .write;│ │70 if (base == .read or containsUserId(event.read_user_ids, &user_id_hex)) return .read; │ │71 return .none; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │132 try validateName(record_to_write.event.name); │ │133 try validateUserIds(record_to_write.event.read_user_ids); │ │134 try validateUserIds(record_to_write.event.write_user_ids); │ │135 + try validateUserIds(record_to_write.event.owner_user_ids); │ │136 } │ │137 │ │138 const user_id_to_repo_id_set_cursor = try haxy_moment.putCursor(hash.hashInt(hash_kind, "user-id->repo-id-set"));│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯