Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

1.7.x #9897

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 449 commits into
base: main
Choose a base branch
Loading
from
Draft

1.7.x #9897

Changes from 1 commit
Commits
Show all changes
449 commits
Select commit Hold shift + click to select a range
e3743f7
Merge branch '1.7.x' into fix-usage-queues
lohanidamodar Jun 8, 2025
e5dc4ac
Merge branch '1.8.x' into 'lazy-load-relationships'.
ItzNotABug Jun 9, 2025
0ee4f3c
bump: dependencies; fix: tests and logic.
ItzNotABug Jun 9, 2025
17f0f51
fix: tests
ItzNotABug Jun 9, 2025
387e8ea
fix: tests
ItzNotABug Jun 9, 2025
564fe53
revert: local docker config.
ItzNotABug Jun 9, 2025
e699c99
update: remove extra line.
ItzNotABug Jun 9, 2025
452aa70
fix: internal ids usage.
ItzNotABug Jun 9, 2025
2e0fb69
fix: internal ids usage.
ItzNotABug Jun 9, 2025
11f31a1
Link parent resource of redirect rule to allow list querying
Meldiron Jun 9, 2025
d6bcb46
Fix specs and sdk generation
Meldiron Jun 9, 2025
166b19b
Merge pull request #9982 from appwrite/fix-redirect-rule-parent-1.7.x
Meldiron Jun 9, 2025
2202b11
fix: cases for backwards compatibility to add database and collection…
ItzNotABug Jun 9, 2025
fa67144
fix: add a small timer again for 1.6.x response format.
ItzNotABug Jun 9, 2025
c852cb3
Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
abnegate Jun 10, 2025
41ce945
Update lock
abnegate Jun 10, 2025
bd4bb48
Fix merge
abnegate Jun 10, 2025
9fc2c5d
Add increment + decrement routes
abnegate Jun 10, 2025
fd7d4db
Fix path param
abnegate Jun 10, 2025
5585a75
Fix auth skips
abnegate Jun 10, 2025
e6881c1
Fix desc
abnegate Jun 10, 2025
91b1670
Fix event
abnegate Jun 10, 2025
cf13a45
Docs
abnegate Jun 10, 2025
6ea6110
Update model
abnegate Jun 10, 2025
2fa5bc6
add: 1.6.x format tests.
ItzNotABug Jun 10, 2025
5b6bc81
Merge branch '1.8.x' into 'lazy-load-relationships'.
ItzNotABug Jun 10, 2025
45619e6
bump: composer.
ItzNotABug Jun 10, 2025
357b290
revert: unnecessary change added during merge.
ItzNotABug Jun 10, 2025
2df28bd
remove: migrations, simplify error recording for frontend.
ItzNotABug Jun 10, 2025
ef12f49
Merge branch '1.7.x' into feat-add-branch-url-for-first-git-deployment
vermakhushboo Jun 10, 2025
e6d143c
Merge branch '1.7.x' into fix-templates
ItzNotABug Jun 10, 2025
bc3e199
chore: update maintenance task to only iterate over active projects
christyjacob4 Jun 10, 2025
b1e11ab
chore: update maintenance task to only iterate over active projects
christyjacob4 Jun 10, 2025
e8e2bb8
chore: update maintenance task to only iterate over active projects
christyjacob4 Jun 10, 2025
a1ff968
chore: update pkgs
ChiragAgg5k Jun 10, 2025
261adac
chore: linter
christyjacob4 Jun 10, 2025
7209024
Add ref param to vcs list contents
vermakhushboo Jun 10, 2025
e1a291f
Consistent messages
abnegate Jun 10, 2025
ffb2728
Type as integer in query base
abnegate Jun 10, 2025
0554f92
Merge pull request #9989 from appwrite/optimise-maintenance-task
christyjacob4 Jun 10, 2025
ff92b23
Merge pull request #9986 from appwrite/feat-incr
abnegate Jun 10, 2025
52de903
Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
abnegate Jun 10, 2025
8c6f0a4
Fix merge
abnegate Jun 10, 2025
a95a651
Add specs
abnegate Jun 10, 2025
a82bd62
Remove bundle
abnegate Jun 10, 2025
d3af2e4
Add SDK version support
abnegate Jun 10, 2025
a77eea6
Fix numeric type values
abnegate Jun 10, 2025
d067d21
Generate latest
abnegate Jun 10, 2025
5f588b0
Fix open API specs
abnegate Jun 10, 2025
178dec0
Add admin key
abnegate Jun 10, 2025
963d177
Update admin spec
abnegate Jun 10, 2025
0823096
Fix DB delete cache purge
abnegate Jun 10, 2025
077c80c
Fix exclude
abnegate Jun 10, 2025
8518949
chore: restore unique filename for health check #9842
ChiragAgg5k Jun 11, 2025
eab0faa
Merge pull request #9987 from appwrite/update-sdks-2
stnguyen90 Jun 11, 2025
c14d40c
Merge pull request #9993 from appwrite/re-revert-pla-2914
stnguyen90 Jun 11, 2025
4332ada
update: tests to correctly run on 1.6.x response format.
ItzNotABug Jun 11, 2025
d6829df
Merge branch '1.8.x' into 'lazy-load-relationships'.
ItzNotABug Jun 11, 2025
93472ac
remove: response format based tests.
ItzNotABug Jun 11, 2025
22f6404
Merge branch '1.7.x' into feat-ref-param-to-vcs-list-contents
vermakhushboo Jun 11, 2025
b4b28a9
fix: project iteration loop
christyjacob4 Jun 11, 2025
78d5424
Merge pull request #9995 from appwrite/optimise-maintenance-task
christyjacob4 Jun 11, 2025
0e17aea
Merge pull request #9946 from appwrite/fix-usage-queues
christyjacob4 Jun 11, 2025
0c8ae4f
feat(builds): after build hook
loks0n Jun 6, 2025
84f4a5d
added logging of errors instead of throwing
ArnabChatterjee20k Jun 11, 2025
e267283
Merge pull request #9996 from appwrite/feat-after-build-hook
christyjacob4 Jun 11, 2025
7fb4dc5
Merge pull request #9997 from ArnabChatterjee20k/dat-452
abnegate Jun 11, 2025
7dd45b0
Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
abnegate Jun 11, 2025
517870d
Test timing
abnegate Jun 12, 2025
87c9f93
address comment.
ItzNotABug Jun 12, 2025
d5bbb95
Merge branch '1.8.x' into lazy-load-relationships
ItzNotABug Jun 12, 2025
6f493e7
remove: unnecessary change.
ItzNotABug Jun 12, 2025
df9a6d8
remove: unnecessary change.
ItzNotABug Jun 12, 2025
f6fa1ae
revert: unnecessary changes.
ItzNotABug Jun 12, 2025
5aa88be
simplify: queries.
ItzNotABug Jun 12, 2025
9f30b02
simplify: queries.
ItzNotABug Jun 12, 2025
c06ff42
fix: attribute types; update: remove sensitive information from realt…
ItzNotABug Jun 12, 2025
0487fae
Merge branch '1.8.x' into 'add-readable-error'.
ItzNotABug Jun 12, 2025
176c085
Fix all vcs urls missing region
vermakhushboo Jun 12, 2025
1b6d05a
Merge branch '1.7.x' into feat-ref-param-to-vcs-list-contents
vermakhushboo Jun 12, 2025
3d9e22a
chore: remove endpoint selector for edge
loks0n Jun 12, 2025
bc41838
chore: remove endpoint selector
loks0n Jun 12, 2025
4d65011
Merge pull request #10000 from appwrite/chore-remove-endpoint-selector
Meldiron Jun 12, 2025
5df2f5f
Merge branch '1.7.x' into fix-github-check-urls
vermakhushboo Jun 12, 2025
ce67def
Merge branch '1.7.x' into fix-github-check-urls
vermakhushboo Jun 12, 2025
014036e
Merge branch 'fix-github-check-urls' of github.com:appwrite/appwrite …
vermakhushboo Jun 12, 2025
cf830af
Check not development for plan error
abnegate Jun 12, 2025
bc7b310
Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
abnegate Jun 12, 2025
fc0e1b6
Update database
abnegate Jun 12, 2025
e7c0111
Merge branch '1.7.x' into feat-speed-up-site-tests
Meldiron Jun 13, 2025
4099f89
Merge branch '1.7.x' into feat-ref-param-to-vcs-list-contents
vermakhushboo Jun 13, 2025
221f153
Update var name and generate specs
vermakhushboo Jun 13, 2025
481f1b4
Merge branch 'feat-ref-param-to-vcs-list-contents' of github.com:appw…
vermakhushboo Jun 13, 2025
3ce2ad1
Merge pull request #9966 from appwrite/feat-speed-up-site-tests
Meldiron Jun 13, 2025
3f14c27
Merge branch '1.7.x' into feat-ref-param-to-vcs-list-contents
vermakhushboo Jun 13, 2025
4704f6f
Merge pull request #9991 from appwrite/feat-ref-param-to-vcs-list-con…
Meldiron Jun 13, 2025
d01f1c1
remove: trace from `errors`.
ItzNotABug Jun 13, 2025
f09042d
update: swap request/response filters from `1.7.x` to `1.8.x`.
ItzNotABug Jun 13, 2025
55be41f
Resolve merge conflicts
vermakhushboo Jun 13, 2025
37388fc
Change php version in composer.lock
vermakhushboo Jun 13, 2025
fc65616
Composer update
vermakhushboo Jun 13, 2025
28db9a2
Merge branch '1.7.x' into feat-add-branch-url-for-first-git-deployment
vermakhushboo Jun 13, 2025
44a5a3e
Merge branch '1.8.x' into lazy-load-relationships
ItzNotABug Jun 13, 2025
c510af0
Update appwrite-assistant image version to 0.8.3
Jun 13, 2025
160c937
fix: prevent 'Attribute "factors" must be an array' error
stnguyen90 Jun 13, 2025
7b322f8
Merge pull request #10003 from appwrite/update-assistant
stnguyen90 Jun 13, 2025
9dd5898
Merge branch '1.7.x' into fix-invalid-factors
ItzNotABug Jun 13, 2025
52f83c4
Merge pull request #10004 from appwrite/fix-invalid-factors
stnguyen90 Jun 13, 2025
089a80e
chore: update coderabbit config file
ChiragAgg5k Jun 14, 2025
c8854e0
chore: formatting
ChiragAgg5k Jun 14, 2025
b096af2
Merge branch '1.7.x' into update-coderabbit-config
ChiragAgg5k Jun 14, 2025
050a563
chore: update cli version and add bulk operation warnings
ChiragAgg5k Jun 14, 2025
e54a157
chore: remove createDocuments method from client side specs
ChiragAgg5k Jun 14, 2025
ac2acbb
fix: duplication of platforms in swagger specs
ChiragAgg5k Jun 14, 2025
0c163ba
fix: reset array keys after removing duplicates in swagger specs
ChiragAgg5k Jun 15, 2025
3be1aa3
Merge branch '1.7.x' into fix-templates
ItzNotABug Jun 15, 2025
96c0354
Override project resource to update hooks, since x-appwrite-project i…
shimonewman Jun 15, 2025
4d41c90
remove duplicate use
shimonewman Jun 15, 2025
7d54a61
remove duplicate use
shimonewman Jun 15, 2025
d7e2552
Merge branch '1.7.x' of github.com:appwrite/appwrite into PLA-3018
shimonewman Jun 15, 2025
c0c30fe
remove duplicate use
shimonewman Jun 15, 2025
b46a4df
Merge pull request #10005 from appwrite/update-coderabbit-config
christyjacob4 Jun 16, 2025
9196ae7
feat: tar support
loks0n Jun 13, 2025
006153e
Merge pull request #10016 from appwrite/feat-support-tar-2
christyjacob4 Jun 16, 2025
15f81d2
Merge branch '1.7.x' into fix-github-check-urls
vermakhushboo Jun 16, 2025
384b423
update deleteProject scope
shimonewman Jun 16, 2025
ea33588
Merge pull request #10017 from appwrite/update-delete-project-signature
christyjacob4 Jun 16, 2025
89f0c28
Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
abnegate Jun 16, 2025
a21ccfd
Merge pull request #9669 from appwrite/lazy-load-relationships
abnegate Jun 16, 2025
e704e96
Revert "Feat: Lazy-load relationships"
abnegate Jun 16, 2025
3ca9599
Merge pull request #10018 from appwrite/revert-9669-lazy-load-relatio…
abnegate Jun 16, 2025
65ac334
Merge branch '1.7.x' into fix-github-check-urls
ItzNotABug Jun 16, 2025
1b768cd
Merge branch '1.7.x' into fix-templates
ItzNotABug Jun 16, 2025
3729c6b
Cast sequence
abnegate Jun 16, 2025
cacf323
update: fallback font to `sans-serif`.
ItzNotABug Jun 17, 2025
c4e7861
update: send only the relevant errors info to frontend.
ItzNotABug Jun 17, 2025
f31a7c0
fix: errors not being replaced but appended.
ItzNotABug Jun 17, 2025
227c4fd
Merge branch '1.8.x' into add-readable-error
ItzNotABug Jun 17, 2025
149ad1a
update: simplify filtering.
ItzNotABug Jun 17, 2025
5fceab8
Merge branch '1.7.x' into fix-github-check-urls
vermakhushboo Jun 17, 2025
dc881f4
Merge branch 'fix-github-check-urls' of github.com:appwrite/appwrite …
vermakhushboo Jun 17, 2025
119bf71
Merge pull request #9998 from appwrite/fix-github-check-urls
christyjacob4 Jun 17, 2025
5d62613
Merge pull request #9947 from appwrite/add-readable-error
abnegate Jun 17, 2025
cc0dfd9
Revert "Update delete project scope"
abnegate Jun 17, 2025
178a8ff
Merge pull request #10022 from appwrite/revert-10017-update-delete-pr…
abnegate Jun 17, 2025
d841511
Merge remote-tracking branch 'origin/1.7.x' into 1.8.x
abnegate Jun 17, 2025
727ad68
Merge pull request #9985 from appwrite/1.8.x
abnegate Jun 17, 2025
6ff6e0a
Merge branch '1.7.x' into fix-platforms-duplication-swagger
ChiragAgg5k Jun 18, 2025
f443426
Fix missing screenshot logs
vermakhushboo Jun 18, 2025
5934ad4
chore: update react native sdk and changelog
ChiragAgg5k Jun 18, 2025
06e382b
Merge pull request #10024 from appwrite/chore-fix-missing-screenshot-…
christyjacob4 Jun 18, 2025
8a1ffca
Merge branch '1.7.x' into update-reactnative-sdk
ChiragAgg5k Jun 18, 2025
5543521
Merge branch '1.7.x' into fix-platforms-duplication-swagger
ChiragAgg5k Jun 18, 2025
528b4f4
Merge pull request #10007 from appwrite/update-sdk-versions-cli
christyjacob4 Jun 18, 2025
2cbc399
update deleteProject scope
shimonewman Jun 18, 2025
3b629e6
Merge branch '1.7.x' into update-reactnative-sdk
christyjacob4 Jun 18, 2025
7ba8a28
Merge branch '1.7.x' of github.com:appwrite/appwrite into update-dele…
shimonewman Jun 18, 2025
89b559d
chore: update composer
ChiragAgg5k Jun 18, 2025
9b1f2df
Merge branch '1.7.x' into fix-platforms-duplication-swagger
ChiragAgg5k Jun 18, 2025
ad9c1ec
Merge pull request #10008 from appwrite/fix-platforms-duplication-swa…
christyjacob4 Jun 18, 2025
1eb5255
Merge branch '1.7.x' into update-delete-project-signature
christyjacob4 Jun 18, 2025
0f8c5fe
Merge branch '1.7.x', commit 'c0c30fe767f8c197b8793bf562f57146e5ba15a…
shimonewman Jun 19, 2025
d70e838
Merge branch '1.7.x' into update-reactnative-sdk
ChiragAgg5k Jun 19, 2025
c1f46fc
chore: update cli
ChiragAgg5k Jun 19, 2025
68fc0f8
set log projectId on the router method
shimonewman Jun 19, 2025
2df4dea
Merge branch '1.7.x' of github.com:appwrite/appwrite into update-dele…
shimonewman Jun 19, 2025
c277408
Merge remote-tracking branch 'origin/update-delete-project-signature'…
shimonewman Jun 19, 2025
81f07d4
Merge pull request #10025 from appwrite/update-reactnative-sdk
christyjacob4 Jun 19, 2025
1d0af0b
Merge branch '1.7.x' of github.com:appwrite/appwrite into update-dele…
shimonewman Jun 19, 2025
fd952f2
Merge pull request #10028 from appwrite/update-delete-project-signature
christyjacob4 Jun 19, 2025
d8c88fb
composer
shimonewman Jun 19, 2025
6d55299
Revert "worker: Graceful shutdown on SIGTERM"
stnguyen90 Jun 21, 2025
2ac4d9f
chore: update executor to fix s3 endpoint bug
ChiragAgg5k Jun 21, 2025
7238e11
fix: pin utopia-php/queue to 0.11.0
stnguyen90 Jun 21, 2025
53ae307
Merge pull request #10035 from appwrite/revert-9890-PLA-2762
christyjacob4 Jun 21, 2025
ffc7f4c
Merge pull request #9590 from appwrite/fix-templates
stnguyen90 Jun 21, 2025
54748b7
Update app/controllers/general.php
christyjacob4 Jun 23, 2025
28f420f
Merge branch '1.7.x' of github.com:appwrite/appwrite into PLA-3018
shimonewman Jun 23, 2025
dd8894a
Merge remote-tracking branch 'origin/PLA-3018' into PLA-3018
shimonewman Jun 23, 2025
3059eec
benchmark cli
shimonewman Jun 23, 2025
4e0faf6
benchmark cli
shimonewman Jun 23, 2025
213b1ae
benchmark cli
shimonewman Jun 23, 2025
030d37f
Merge pull request #10036 from appwrite/update-executor
stnguyen90 Jun 24, 2025
6996cc2
Fix logs order
Meldiron Jun 24, 2025
5dcc508
Fix logs parsing
Meldiron Jun 24, 2025
b5bc240
Fix ssr separation; add edge debugging logs
Meldiron Jun 24, 2025
c04c2d2
Remove logs, fix edge logs missing
Meldiron Jun 24, 2025
e712ba5
Merge branch '1.7.x' of github.com:appwrite/appwrite into PLA-3018
shimonewman Jun 25, 2025
4b19669
Fix build duration calculation
Meldiron Jun 25, 2025
17428ef
refactor: replace Console loop with Swoole Timer for stats resource m…
christyjacob4 Jun 25, 2025
c268b63
chore: update benchmark command to use JSON output format and adjust …
christyjacob4 Jun 25, 2025
b6d4baf
Fix tests
Meldiron Jun 25, 2025
347f035
chore: fix benchmark CI
christyjacob4 Jun 25, 2025
93651c7
chore: fix benchmark CI
christyjacob4 Jun 25, 2025
f394f3d
Merge pull request #10055 from appwrite/chore-fix-benchmark-ci
Meldiron Jun 25, 2025
213cbf0
Merge pull request #10053 from appwrite/fix-build-duration
Meldiron Jun 25, 2025
6cb3e35
Merge branch '1.7.x' into fix-logs-order
Meldiron Jun 25, 2025
56347e4
Fix syntax bug
Meldiron Jun 25, 2025
c85cfe1
Improve flaky tests logging
Meldiron Jun 25, 2025
975f653
Merge pull request #9969 from appwrite/feat-add-branch-url-for-first-…
Meldiron Jun 25, 2025
f07abce
Merge branch '1.7.x' into feat-use-first-class-callable-syntax
Meldiron Jun 25, 2025
bfbcd64
Merge pull request #9967 from appwrite/feat-use-first-class-callable-…
Meldiron Jun 25, 2025
19152f5
Merge branch '1.7.x' of github.com:appwrite/appwrite into PLA-3018
shimonewman Jun 25, 2025
3fae6ae
Merge pull request #10011 from appwrite/PLA-3018
christyjacob4 Jun 25, 2025
5173e03
Merge branch '1.7.x' of github.com:appwrite/appwrite into chore-fix-t…
christyjacob4 Jun 25, 2025
3cd31e2
Add disableSubqueries method to Action class and integrate it into St…
christyjacob4 Jun 25, 2025
c479a11
Add logging functionality to Action class with dump method and refact…
christyjacob4 Jun 25, 2025
92a0453
Add database worker job logging
abnegate Jun 25, 2025
d7d7fa3
Add trigger logging
abnegate Jun 25, 2025
e37cea5
Add more trigger logging
abnegate Jun 25, 2025
255be3b
Ensure heartbeat is cleared on destruct
abnegate Jun 25, 2025
d52d8f7
Fix API dump
abnegate Jun 25, 2025
f0ea206
Fix bench
abnegate Jun 25, 2025
620266d
Remove heartbeat
abnegate Jun 25, 2025
7508a22
Lint
abnegate Jun 25, 2025
e8982e6
Merge pull request #10056 from appwrite/feat-update-logging
abnegate Jun 25, 2025
d2753bd
add: missing injections.
ItzNotABug Jun 26, 2025
8f5b53d
revert: composer.lock.
ItzNotABug Jun 26, 2025
038b5d7
fix: lint.
ItzNotABug Jun 26, 2025
72956d1
fix: misaligned param order.
ItzNotABug Jun 26, 2025
8bf3a8b
chore: add runtimeEntrypoint param
ChiragAgg5k Jun 26, 2025
276a294
chore: update createExecution
ChiragAgg5k Jun 26, 2025
e5621f3
Merge pull request #10062 from appwrite/add-runtimeEntrypoint
Meldiron Jun 26, 2025
22900e3
Merge pull request #10061 from appwrite/fix-missing-injections
christyjacob4 Jun 26, 2025
dbc7e5b
Fix output format flag in benchmark workflow for consistency
christyjacob4 Jun 26, 2025
5761320
Update src/Appwrite/Platform/Action.php
christyjacob4 Jun 26, 2025
204b008
Refactor log message documentation in Action class to improve clarity…
christyjacob4 Jun 26, 2025
1dfba85
Merge pull request #10054 from appwrite/chore-fix-tasks
christyjacob4 Jun 26, 2025
2fa3ca2
Merge pull request #10052 from appwrite/fix-logs-order
Meldiron Jun 26, 2025
918ad89
Fix flakyness of account tests
Meldiron Jun 26, 2025
87c100d
Improve General tests logging
Meldiron Jun 26, 2025
572ff06
Fix robots.txt 5xx error
Meldiron Jun 26, 2025
d4b5317
Update tests/e2e/Scopes/Scope.php
Meldiron Jun 26, 2025
ee2796f
fix: correct parameter order in action function for robots.txt route
christyjacob4 Jun 26, 2025
368f928
Merge pull request #10067 from appwrite/fix-parameter-order
christyjacob4 Jun 26, 2025
8dcc3c4
Merge branch '1.7.x' into fix-account-test-flakyness
Meldiron Jun 26, 2025
bda9adc
Fix sms mock endpoint
Meldiron Jun 26, 2025
a356e86
Add previe wendpoint logging
Meldiron Jun 26, 2025
df902d2
Fix account tests using old token
Meldiron Jun 26, 2025
42a0d64
Merge pull request #10068 from appwrite/chore-preview-logging
Meldiron Jun 26, 2025
3a8dafe
Merge branch '1.7.x' into fix-account-test-flakyness
Meldiron Jun 26, 2025
b12ea0b
Fix merge conflict bug
Meldiron Jun 26, 2025
23f350c
Merge branch '1.7.x' into fix-account-test-flakyness
Meldiron Jun 26, 2025
ee22583
Fix default param syntax
Meldiron Jun 26, 2025
718cefd
Merge pull request #10066 from appwrite/fix-account-test-flakyness
Meldiron Jun 26, 2025
5a48fd6
chore: update cli to 8.1.0 and add changelog
ChiragAgg5k Jun 27, 2025
151711a
Merge branch '1.7.x' into update-cli-8.1.0
ChiragAgg5k Jun 27, 2025
f056a8b
fix: composer
ChiragAgg5k Jun 27, 2025
156daca
fix: composer
ChiragAgg5k Jun 27, 2025
cb19798
Merge pull request #10070 from appwrite/update-cli-8.1.0
christyjacob4 Jun 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: memberships patch and delete logic.
  • Loading branch information
ItzNotABug committed May 26, 2025
commit 856a9a714b4923f79cffe7b235bf842829cb167c
21 changes: 14 additions & 7 deletions 21 app/controllers/api/teams.php
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,12 @@
max: 2
);

// Is the role change being requested by the user on their own membership?
$isCurrentUserAnOwner = $user->getInternalId() === $membership->getAttribute('userInternalId');

// Prevent role change if there's only one owner left,
// the requester is that owner, and the new `$roles` no longer include 'owner'!
if ($ownersCount === 1 && $isOwner && !\in_array('owner', $roles)) {
// the requester is that owner, and the new `$roles` no longer include 'owner'
if ($ownersCount === 1 && $isOwner && $isCurrentUserAnOwner && !\in_array('owner', $roles)) {
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'There must be at least one owner in the organization.');
}
}
Expand Down Expand Up @@ -1314,21 +1317,22 @@
))
->param('teamId', '', new UID(), 'Team ID.')
->param('membershipId', '', new UID(), 'Membership ID.')
->inject('user')
->inject('project')
->inject('response')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $teamId, string $membershipId, Document $project, Response $response, Database $dbForProject, Event $queueForEvents) {
->action(function (string $teamId, string $membershipId, Document $user, Document $project, Response $response, Database $dbForProject, Event $queueForEvents) {

$membership = $dbForProject->getDocument('memberships', $membershipId);

if ($membership->isEmpty()) {
throw new Exception(Exception::TEAM_INVITE_NOT_FOUND);
}

$user = $dbForProject->getDocument('users', $membership->getAttribute('userId'));
$profile = $dbForProject->getDocument('users', $membership->getAttribute('userId'));

if ($user->isEmpty()) {
if ($profile->isEmpty()) {
throw new Exception(Exception::USER_NOT_FOUND);
}

Expand All @@ -1354,7 +1358,10 @@
max: 2
);

if ($ownersCount === 1) {
// Is the deletion being requested by the user on their own membership?
$isCurrentUserAnOwner = $user->getInternalId() === $membership->getAttribute('userInternalId');

if ($ownersCount === 1 && $isCurrentUserAnOwner) {
/* Prevent removal if the user is the only owner. */
throw new Exception(
Exception::GENERAL_ARGUMENT_INVALID,
Expand All @@ -1378,8 +1385,8 @@
}

$queueForEvents
->setParam('userId', $user->getId())
->setParam('teamId', $team->getId())
->setParam('userId', $profile->getId())
->setParam('membershipId', $membership->getId())
->setPayload($response->output($membership, Response::MODEL_MEMBERSHIP))
;
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.