diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index e8fc6cbafc..c64165179a 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -1,39 +1,22 @@
name: Report a bug
-description: For regressions only (things that were working earlier)
+description: Things that were working earlier but don't anymore
labels: []
body:
- type: markdown
attributes:
value: |
- Before opening a new issue, **please** ensure
- 1. You are on the latest version,
- 2. You've searched for existing issues,
- 3. It was working earlier (otherwise use [this](https://github.com/ente-io/ente/discussions/categories/enhancements))
- 4. It is not about self hosting (otherwise use [this](https://github.com/ente-io/ente/discussions/categories/q-a))
+ **Checklist**
+ 1. You've searched existing [issues](https://github.com/search?q=repo%3Aente-io%2Fente+&type=issues) and [discussions](https://github.com/search?q=repo%3Aente-io%2Fente+&type=discussions)
+ 2. It was working earlier (otherwise use [enhancements](https://github.com/ente-io/ente/discussions/categories/enhancements))
+ 3. It is not about self hosting (for those use [this](https://github.com/ente-io/ente/discussions/categories/q-a))
- type: textarea
attributes:
label: Description
- description: >
- Describe the bug and steps to reproduce the behaviour, and how it
- differs from the previously working behaviour.
- validations:
- required: true
- type: input
attributes:
label: Version
description: The version can be seen at the bottom of settings.
placeholder: e.g. v1.2.3
- - type: input
- attributes:
- label: Last working version
- description: >
- The version where things were last known to be working. It is fine
- if you don't remember the exact version (mention roughly then),
- but **if there just isn't a last working version, then please file
- it as an
- [enhancement](https://github.com/ente-io/ente/discussions/categories/enhancements))**
- (where the community upvotes can be used to help prioritize).
- placeholder: e.g. v1.2.3
- type: dropdown
attributes:
label: What product are you using?
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 242cc2b65c..f4b90454e2 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,54 +1,42 @@
# Contributing
-First and foremost, thank you for your interest in contributing to Ente 🙏
-
-There are many ways to contribute, and most of them don't require writing code.
-
-* [Spread the word](#spread-the-word)
-* [Engage with the community](#engage-with-the-community)
-* [Translate](#translate)
-* [Document](#document)
-
+- [Spread the word](#spread-the-word)
+- [Engage with the community](#engage-with-the-community)
+- [Translate](#translate)
+- [Document](#document)
## Spread the word
-This is perhaps the most impactful contribution you can make. [Spread the
-word](https://help.ente.io/photos/features/referral-program/). Online on your
-favorite social media channels. Offline to your friends and family who are
-looking for a privacy-friendly alternative to big tech.
+**This is the most impactful contribution you can make**.
+
+[Spread the word](https://help.ente.io/photos/features/referral-program/). Online on your favorite social media channels. Offline to your friends and family who are looking for a privacy-friendly alternative to big tech.
## Engage with the community
-Just hang around, enjoy the vibe. Answer someone's query on our
-[Discord](https://discord.gg/z2YVKkycX3), or pile on in the sporadic #off-topic
-rants there. Chuckle (or wince!) at our [Twitter](https://twitter.com/enteio)
-memes. Suggest a new feature in our [Github
-Discussions](https://github.com/ente-io/ente/discussions/new?category=enhancements),
-or upvote the existing ones that you feel we should focus on first. Provide your
-opinion on existing threads.
+Just hang around, enjoy the vibe. The Ente community — the people who are building Ente, and the people who are using Ente — hang out at various places depending on their proclivity:
-These might seem like small things, but it provides us energy. Knowing that
-there is a community of people who care for what we are building.
+- [Discord](https://discord.ente.io)
+- [Mastodon](https://fosstodon.org/@ente)
+- [X / Twitter](https://twitter.com/enteio)
+- [Github Discussions](https://github.com/ente-io/ente/discussions)
+
+Just being around might seem a small thing, but it provides us energy. Knowing that there is a community of people who care for what we are building, **who want us to do better**.
## Translate
-If you're interested in helping out with translation, please visit our Crowdin
-projects to get started:
-
-| Project | |
-| ------------- | ------------- |
-| [Auth](https://crowdin.com/project/ente-authenticator-app) | [](https://crowdin.com/project/ente-authenticator-app) |
-| [Photos](https://crowdin.com/project/ente-photos-app) | [](https://crowdin.com/project/ente-photos-app) |
-| [Photos Web / Desktop](https://crowdin.com/project/ente-photos-web) | [](https://crowdin.com/project/ente-photos-web) |
+Visit our Crowdin projects to help with translations:
+| Project | |
+| ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
+| [Auth](https://crowdin.com/project/ente-authenticator-app) | [](https://crowdin.com/project/ente-authenticator-app) |
+| [Photos](https://crowdin.com/project/ente-photos-app) | [](https://crowdin.com/project/ente-photos-app) |
+| [Photos Web / Desktop](https://crowdin.com/project/ente-photos-web) | [](https://crowdin.com/project/ente-photos-web) |
If your language is not listed for translation, please [create a GitHub
issue](https://github.com/ente-io/ente/issues/new?title=Request+for+New+Language+Translation&body=Language+name%3A+%0AProject%3A+auth%2Fphotos%2Fboth)
to have it added. It is okay to have partial translations. Once ~90% of the
strings in a language get translated, we will start surfacing it in the apps.
-Thank you for your support.
-
## Document
The help guides and FAQs for users of Ente products are also open source, and
@@ -60,25 +48,9 @@ See [docs/](docs/README.md) for how to edit these documents.
## Code contributions
-Code is a small aspect of community, and the ways mentioned above are more
-important in helping us. But if you'd _really_ like to contribute code, it is
-best to start small. Consider some well-scoped changes, say like adding more
-[custom icons to auth](auth/docs/adding-icons.md).
+If you'd like to contribute code, it is best to start small. Consider some well-scoped changes, say like adding more [custom icons to auth](auth/docs/adding-icons.md), or fixing a specific bug.
-Each of the individual product/platform specific directories in this repository
-have instructions on setting up a dev environment.
-
-For anything beyond trivial bug fixes, please use
-[discussions](https://github.com/ente-io/ente/discussions) instead of performing
-code changes directly.
-
-> [!TIP]
->
-> Please remember that code is a important, but small, part of the overall big
-> picture that makes a product a joy to use. Something that's easy in code is
-> not necessarily the right choice for the product as a whole. So we'll repeat -
-> there are other ways to contribute than code that we'd request you to
-> consider.
+Code that changes the behaviour of the product might not get merged, at least not initially. The PR can serve as a discussion bed, but you might find it easier to just start a discussion instead, or post your perspective in the (likely) existing thread about the behaviour change or new feature you wish for.
## Leave a review or star
diff --git a/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json b/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json
index 703bd7419a..129e14ca96 100644
--- a/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json
+++ b/mobile/apps/auth/assets/custom-icons/_data/custom-icons.json
@@ -71,6 +71,9 @@
],
"hex": "fd4b2d"
},
+ {
+ "title": "availity"
+ },
{
"title": "AzurHosts",
"slug": "azurhosts",
@@ -121,6 +124,13 @@
{
"title": "Belo"
},
+ {
+ "title": "bestbuy",
+ "altNames": [
+ "Best Buy",
+ "bestbuy.com"
+ ]
+ },
{
"title": "Bethesda",
"altNames": [
@@ -292,6 +302,25 @@
{
"title": "CoinDCX"
},
+ {
+ "title": "colorado",
+ "altNames": [
+ "Colorado.gov",
+ "Colorado Gov",
+ "Colorado Government",
+ "Colorado Government Portal",
+ "Colorado COVES Death Certificates",
+ "Colorado COVES",
+ "Colorado Official State Web Portal",
+ "Colorado State Web Portal",
+ "Colorado State Portal",
+ "Colorado Web Portal",
+ "Colorado Portal",
+ "Colorado State",
+ "Colorado PEAK",
+ "myColorado"
+ ]
+ },
{
"title": "ConfigCat"
},
@@ -403,6 +432,13 @@
"Murena"
]
},
+ {
+ "title": "emeritihealth",
+ "altNames": [
+ "Emeriti Health",
+ "Emeriti Retirement Health",
+ ]
+ },
{
"title": "eneba"
},
@@ -706,6 +742,14 @@
{
"title": "Letterboxd"
},
+ {
+ "title": "lincolnfinancial",
+ "altNames": [
+ "Lincoln Financial",
+ "Lincoln Financial Group",
+ "LFG"
+ ]
+ },
{
"title": "LinkedIn",
"slug": "linkedin"
@@ -842,6 +886,9 @@
"title": "Name.com",
"slug": "name_com"
},
+ {
+ "title": "nasdaq"
+ },
{
"title": "Nextcloud",
"slug": "nextcloud"
@@ -926,6 +973,9 @@
{
"title": "NuCommunity"
},
+ {
+ "title": "numerai"
+ },
{
"title": "NVIDIA"
},
@@ -956,6 +1006,10 @@
"title": "Oracle Cloud",
"slug": "oracle_cloud"
},
+ {
+ "title": "Pangolin",
+ "slug": "pangolin"
+ },
{
"title": "Parqet",
"slug": "parqet"
@@ -1374,6 +1428,16 @@
"title": "Ubuntu One",
"slug": "ubuntu_one"
},
+ {
+ "title": "unitedhealthgroup",
+ "altNames": [
+ "Unitedhealth Group",
+ "United Healthgroup",
+ "UHG",
+ "uhg.com",
+ "unitedhealthgroup.com"
+ ]
+ },
{
"title": "Unity",
"hex": "858585"
diff --git a/mobile/apps/auth/assets/custom-icons/icons/availity.svg b/mobile/apps/auth/assets/custom-icons/icons/availity.svg
new file mode 100644
index 0000000000..31071124bc
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/availity.svg
@@ -0,0 +1,10 @@
+
+
diff --git a/mobile/apps/auth/assets/custom-icons/icons/bestbuy.svg b/mobile/apps/auth/assets/custom-icons/icons/bestbuy.svg
new file mode 100644
index 0000000000..3e582ef525
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/bestbuy.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/mobile/apps/auth/assets/custom-icons/icons/colorado.svg b/mobile/apps/auth/assets/custom-icons/icons/colorado.svg
new file mode 100644
index 0000000000..b57991d11d
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/colorado.svg
@@ -0,0 +1,16 @@
+
+
diff --git a/mobile/apps/auth/assets/custom-icons/icons/emeritihealth.svg b/mobile/apps/auth/assets/custom-icons/icons/emeritihealth.svg
new file mode 100644
index 0000000000..9d557945ae
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/emeritihealth.svg
@@ -0,0 +1,11 @@
+
+
diff --git a/mobile/apps/auth/assets/custom-icons/icons/lincolnfinancial.svg b/mobile/apps/auth/assets/custom-icons/icons/lincolnfinancial.svg
new file mode 100644
index 0000000000..236eace52a
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/lincolnfinancial.svg
@@ -0,0 +1,13 @@
+
+
diff --git a/mobile/apps/auth/assets/custom-icons/icons/nasdaq.svg b/mobile/apps/auth/assets/custom-icons/icons/nasdaq.svg
new file mode 100644
index 0000000000..761481e2b2
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/nasdaq.svg
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/mobile/apps/auth/assets/custom-icons/icons/numerai.svg b/mobile/apps/auth/assets/custom-icons/icons/numerai.svg
new file mode 100644
index 0000000000..d9bd424b93
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/numerai.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/mobile/apps/auth/assets/custom-icons/icons/pangolin.svg b/mobile/apps/auth/assets/custom-icons/icons/pangolin.svg
new file mode 100644
index 0000000000..5e81a57f53
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/pangolin.svg
@@ -0,0 +1,22 @@
+
+
+
+
diff --git a/mobile/apps/auth/assets/custom-icons/icons/unitedhealthgroup.svg b/mobile/apps/auth/assets/custom-icons/icons/unitedhealthgroup.svg
new file mode 100644
index 0000000000..8dca1d8136
--- /dev/null
+++ b/mobile/apps/auth/assets/custom-icons/icons/unitedhealthgroup.svg
@@ -0,0 +1,8 @@
+
+
diff --git a/server/ente/userentity/entity.go b/server/ente/userentity/entity.go
index 09f0ddfd46..904b846d1a 100644
--- a/server/ente/userentity/entity.go
+++ b/server/ente/userentity/entity.go
@@ -11,14 +11,18 @@ type EntityType string
const (
Location EntityType = "location"
- Person EntityType = "person"
+ // Person entity is deprecated and will be removed in the future.
+ //Deprecated ..
+ Person EntityType = "person"
// CGroup is a new version of Person entity, where the data is gzipped before encryption
CGroup EntityType = "cgroup"
+ // SmartAlbum is a new entity type for storing smart album config data
+ SmartAlbum EntityType = "smart_album"
)
func (et EntityType) IsValid() error {
switch et {
- case Location, Person, CGroup:
+ case Location, Person, CGroup, SmartAlbum:
return nil
}
return ente.NewBadRequestWithMessage(fmt.Sprintf("Invalid EntityType: %s", et))
@@ -65,6 +69,26 @@ type EntityDataRequest struct {
Type EntityType `json:"type" binding:"required"`
EncryptedData string `json:"encryptedData" binding:"required"`
Header string `json:"header" binding:"required"`
+ ID *string `json:"id"` // Optional ID, if not provided a new ID will be generated
+}
+
+func (edr *EntityDataRequest) IsValid(userID int64) error {
+ if err := edr.Type.IsValid(); err != nil {
+ return err
+ }
+ switch edr.Type {
+ case SmartAlbum:
+ if edr.ID == nil {
+ return ente.NewBadRequestWithMessage("ID is required for SmartAlbum entity type")
+ }
+ // check if ID starts with sa_userid_ or not
+ if !strings.HasPrefix(*edr.ID, fmt.Sprintf("sa_%d_", userID)) {
+ return ente.NewBadRequestWithMessage(fmt.Sprintf("ID %s is not valid for SmartAlbum entity type", *edr.ID))
+ }
+ return nil
+ default:
+ return nil
+ }
}
// UpdateEntityDataRequest updates the current entity
diff --git a/server/pkg/api/userentity.go b/server/pkg/api/userentity.go
index acda89a09e..e8aa043b5b 100644
--- a/server/pkg/api/userentity.go
+++ b/server/pkg/api/userentity.go
@@ -61,10 +61,6 @@ func (h *UserEntityHandler) CreateEntity(c *gin.Context) {
stacktrace.Propagate(ente.ErrBadRequest, fmt.Sprintf("Request binding failed %s", err)))
return
}
- if err := request.Type.IsValid(); err != nil {
- handler.Error(c, stacktrace.Propagate(err, "Invalid EntityType"))
- return
- }
resp, err := h.Controller.CreateEntity(c, request)
if err != nil {
handler.Error(c, stacktrace.Propagate(err, "Failed to create CreateEntityKey"))
diff --git a/server/pkg/controller/filedata/controller.go b/server/pkg/controller/filedata/controller.go
index 65cbef0033..9c192d7495 100644
--- a/server/pkg/controller/filedata/controller.go
+++ b/server/pkg/controller/filedata/controller.go
@@ -22,6 +22,7 @@ import (
"github.com/gin-gonic/gin"
log "github.com/sirupsen/logrus"
"net/http"
+ "strings"
"sync"
gTime "time"
)
@@ -264,12 +265,12 @@ func (c *Controller) getS3FileMetadataParallel(ctx *gin.Context, dbRows []fileDa
func (c *Controller) fetchS3FileMetadata(ctx context.Context, row fileData.Row, ctxLogger *log.Entry) (*fileData.S3FileMetadata, error) {
dc := row.LatestBucket
- // :todo:neeraj make it configurable to
- // specify preferred dc to read from
- // and fallback logic to read from different bucket when we fail to read from preferred dc
- if dc == "b5" {
- if array.StringInList("b6", row.ReplicatedBuckets) {
- dc = "b6"
+ preferredBucket := c.S3Config.GetBucketID(row.Type)
+ // If the current primary bucket is different from the latest bucket where data was written,
+ // check and use the preferred bucket if the data is replicated there.
+ if !strings.EqualFold(preferredBucket, dc) {
+ if array.StringInList(preferredBucket, row.ReplicatedBuckets) {
+ dc = preferredBucket
}
}
opt := _defaultFetchConfig
diff --git a/server/pkg/controller/userentity/controller.go b/server/pkg/controller/userentity/controller.go
index f4fb1c8b9b..38b99fba22 100644
--- a/server/pkg/controller/userentity/controller.go
+++ b/server/pkg/controller/userentity/controller.go
@@ -32,6 +32,9 @@ func (c *Controller) GetKey(ctx *gin.Context, req model.GetEntityKeyRequest) (*m
// CreateEntity stores entity data for the given type
func (c *Controller) CreateEntity(ctx *gin.Context, req model.EntityDataRequest) (*model.EntityData, error) {
userID := auth.GetUserID(ctx.Request.Header)
+ if err := req.IsValid(userID); err != nil {
+ return nil, stacktrace.Propagate(err, "invalid EntityDataRequest")
+ }
id, err := c.Repo.Create(ctx, userID, req)
if err != nil {
return nil, stacktrace.Propagate(err, "failed to createEntity")
diff --git a/server/pkg/repo/userentity/data.go b/server/pkg/repo/userentity/data.go
index fa6457ebfa..45f59d3051 100644
--- a/server/pkg/repo/userentity/data.go
+++ b/server/pkg/repo/userentity/data.go
@@ -14,12 +14,17 @@ import (
// Create inserts a new entry
func (r *Repository) Create(ctx context.Context, userID int64, entry model.EntityDataRequest) (string, error) {
- idPrt, err := entry.Type.GetNewID()
- if err != nil {
- return "", stacktrace.Propagate(err, "failed to generate new id")
+ var id string
+ if entry.ID != nil {
+ id = *entry.ID
+ } else {
+ idPrt, err := entry.Type.GetNewID()
+ if err != nil {
+ return "", stacktrace.Propagate(err, "failed to generate new id")
+ }
+ id = *idPrt
}
- id := *idPrt
- err = r.DB.QueryRow(`INSERT into entity_data(
+ err := r.DB.QueryRow(`INSERT into entity_data(
id,
user_id,
type,