feat: add is_enterprise_only attribute to apps#1840
Open
edward-ly wants to merge 9 commits into
Open
Conversation
edward-ly
force-pushed
the
feat/1785/enterprise-apps
branch
from
July 16, 2026 05:59
5f46a06 to
20bca73
Compare
edward-ly
force-pushed
the
feat/1785/enterprise-apps
branch
5 times, most recently
from
July 16, 2026 18:25
fa9df3d to
b90ac55
Compare
julien-nc
reviewed
Jul 17, 2026
julien-nc
left a comment
Member
There was a problem hiding this comment.
I'm not familiar with the appstore code so I had a look and: Lgtm.
Then I asked Qwen:
- urls.py:45 — appapi_apps.json uses apps_all_etag which now reads include_enterprise from the request. But AppApiAppsView doesn't filter by is_enterprise_only, so sending ?include_enterprise=true to that endpoint would compute an etag over a different dataset than what's actually returned. Either:
- Give AppApiAppsView its own etag function that ignores the param, or
- Also filter enterprise apps in AppApiAppsView if that makes sense for the app API.
- caching.py:42-57 — apps_etag and apps_last_modified still use App.objects.all(). The AppView (per-version) doesn't filter enterprise-only apps either. If the intent is to hide enterprise apps from the public app list, shouldn't the per-version endpoint also exclude them? This is the endpoint Nextcloud server actually calls to get compatible apps.
- The AppSerializer doesn't include is_enterprise_only, so API consumers can't tell which apps are enterprise-only. This might be intentional, but seems like an oversight — at minimum the Nextcloud server would need to know.
- views.py:198 — When an existing app owner re-registers (e.g. to update their certificate), is_enterprise_only gets overwritten from the request body. This means the owner can silently toggle the flag at any time via re-registration, which contradicts the issue's intent that only admins should be able to change it post-registration. Consider only setting it on creation
- The query param parsing is duplicated between AppsView._include_enterprise (views.py) and _include_enterprise (caching.py) with slightly different implementations. Extract to a shared utility.
Wdyt?
edward-ly
force-pushed
the
feat/1785/enterprise-apps
branch
from
July 17, 2026 16:00
b90ac55 to
264313b
Compare
Collaborator
Author
|
All bullet points should now be addressed, thanks! |
Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
…r form Signed-off-by: Edward Ly <contact@edward.ly>
Assisted-by: OpenCode:GLM-5.2 Signed-off-by: Edward Ly <contact@edward.ly>
Signed-off-by: Edward Ly <contact@edward.ly>
edward-ly
force-pushed
the
feat/1785/enterprise-apps
branch
from
July 17, 2026 16:01
264313b to
557a6da
Compare
Signed-off-by: Edward Ly <contact@edward.ly>
…son endpoints Assisted-by: OpenCode:GLM-5.2 Signed-off-by: Edward Ly <contact@edward.ly>
…orm endpoint Signed-off-by: Edward Ly <contact@edward.ly>
Assisted-by: OpenCode:GLM-5.2 Signed-off-by: Edward Ly <contact@edward.ly>
edward-ly
force-pushed
the
feat/1785/enterprise-apps
branch
from
July 17, 2026 16:18
557a6da to
2fe3d7c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1785. In lieu of validating subscription keys, for now, a simple
include_enterprisequery parameter is added to the/api/v1/apps.jsonendpoint which controls whether or not enterprise-only apps are included in the list.🤖 AI (if applicable)