public void TakeRights(int userId) { if (!this.HasRights(userId)) { return; } RoomRightsDatabase.TakeRights(this.Room.Id, userId); this.UserRights.Remove(this.UserRights.Where(right => right.Id == userId).First()); }
public void GiveRights(int userId) { if (this.HasRights(userId)) { return; } RoomRightsDatabase.GiveRights(this.Room.Id, userId); UserRight right = new UserRight() { Id = userId, Username = "" //todo: }; this.UserRights.Add(right); }
public RoomRights(Room room) { this.UserRights = RoomRightsDatabase.ReadRights(room.Id); this.Room = room; }