diff --git a/CHANGES.md b/CHANGES.md
index aee5e0eba..135facb84 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,7 +6,7 @@
* Added option to disable abuse check and rate limits
* Added input field with the server API endpoint for easy access
* Added new OAuth providers for Google and Gitlab
-* Added 8 new locales for locale service and email templates (no, pt-br, es, ua, ru, id, fi, cat)
+* Added 15 new locales for locale service and email templates (cat, de, es, fi, fr, gr, hi, id, it, nl, pt-br, pt-pt, ro, tr, ua)
* Improved test coverage for the project and synced DEV & CI environments settings
## Bug Fixes
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index c1ac1ca49..f985e7c6d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -36,7 +36,7 @@ Appwrite uses PHPs Composer for managing dependencies on the server-side and JS
Appwrite is following the PHP-FIG standards. Currently, we are using both PSR-0 and PSR-4 for coding standards and autoloading standards. Soon we will also review the project for support with PSR-12 (Extended Coding Style).
-We use prettier for our JS coding standards and for auto-formmating our code.
+We use prettier for our JS coding standards and for auto-formatting our code.
## Scalability, Speed and Performance
@@ -63,7 +63,7 @@ Appwrite current structure is a combination of both Monolithic and Microservice
Appwrite main API container is designed as a monolithic app. This is a decision we made to allow us to develop the project faster while still being a very small team.
-Although the Appwrite API is a monolithic app, it has a very clear separation of concern as each internal service or worker is separated by it its container which will allow us as we grow to start breaking services for better maintenance and scalability.
+Although the Appwrite API is a monolithic app, it has a very clear separation of concern as each internal service or worker is separated by its container which will allow us as we grow to start breaking services for better maintenance and scalability.
### The Microservice Part
@@ -83,9 +83,9 @@ Adding a new dependency should have vital value on the product with minimum poss
## Introducing New Features
-We whould 💖 you to contribute to Appwrite, but we whould also like to make sure Appwrite is as great as possible and loyal to its vision and mission statement 🙏.
+We would 💖 you to contribute to Appwrite, but we would also like to make sure Appwrite is as great as possible and loyal to its vision and mission statement 🙏.
-For us to find the right balance, please open an issue explaining your ideas before intoducing a new pull requests.
+For us to find the right balance, please open an issue explaining your ideas before introducing a new pull request.
This will allow the Appwrite community to have sufficient discussion about the new feature value and how it fits in the product roadmap and vision.
@@ -121,6 +121,6 @@ Before running the command make sure you have proper write permissions to Appwri
## Tutorials
-From time to time our team will add tutorials that will help contributers find there way in the Appwrite source code. Below is a list of currently available tutorials:
+From time to time our team will add tutorials that will help contributors find there way in the Appwrite source code. Below is a list of currently available tutorials:
-* [Adding Support for a New OAuth Provider](./docs/AddOAuthProvider.md)
\ No newline at end of file
+* [Adding Support for a New OAuth Provider](./docs/AddOAuthProvider.md)
diff --git a/Dockerfile b/Dockerfile
index f44988d20..dedf67908 100755
--- a/Dockerfile
+++ b/Dockerfile
@@ -63,24 +63,24 @@ RUN \
RUN echo "upload_max_filesize = 4M" > /etc/php/7.3/fpm/conf.d/appwrite.ini
# nginx conf (with ssl certificates)
-ADD ./docker/nginx.conf /etc/nginx/nginx.conf
-ADD ./docker/ssl/nginx.crt /etc/nginx/ssl/nginx.crt
-ADD ./docker/ssl/nginx.key /etc/nginx/ssl/nginx.key
+COPY ./docker/nginx.conf /etc/nginx/nginx.conf
+COPY ./docker/ssl/nginx.crt /etc/nginx/ssl/nginx.crt
+COPY ./docker/ssl/nginx.key /etc/nginx/ssl/nginx.key
# php conf
RUN mkdir -p /var/run/php
-ADD ./docker/www.conf /etc/php/7.3/fpm/pool.d/www.conf
+COPY ./docker/www.conf /etc/php/7.3/fpm/pool.d/www.conf
# supervisord conf
-ADD ./docker/supervisord.conf /etc/supervisord.conf
-ADD ./docker/entrypoint.sh /entrypoint.sh
+COPY ./docker/supervisord.conf /etc/supervisord.conf
+COPY ./docker/entrypoint.sh /entrypoint.sh
RUN chmod 775 /entrypoint.sh
# add PHP files
-ADD ./app /usr/share/nginx/html/app
-ADD ./public /usr/share/nginx/html/public
-ADD ./src /usr/share/nginx/html/src
-ADD ./vendor /usr/share/nginx/html/vendor
+COPY ./app /usr/share/nginx/html/app
+COPY ./public /usr/share/nginx/html/public
+COPY ./src /usr/share/nginx/html/src
+COPY ./vendor /usr/share/nginx/html/vendor
WORKDIR /storage/uploads
RUN chown -Rf www-data.www-data /storage/uploads && chmod -Rf 0755 /storage/uploads
@@ -90,4 +90,4 @@ RUN chown -Rf www-data.www-data /storage/cache && chmod -Rf 0755 /storage/cache
EXPOSE 80
-CMD ["/bin/bash", "/entrypoint.sh"]
\ No newline at end of file
+CMD ["/bin/bash", "/entrypoint.sh"]
diff --git a/README.md b/README.md
index 988ee8c1a..5e0030d76 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
- Simple Backend Server for your [Vue / Angular / React / iOS / Android / Flutter / *ANY*] Frontend App
+ Simple Backend Server for your [Vue / Angular / React / iOS / Android / Flutter / *ANY OTHER*] Frontend App
+ Hola {{name}},
+
+
+ Segueix aquest enllaç per verificar la teva direcció de correu:
+
+ {{redirect}}
+
+
+ Si no has solicitat verificar aquesta direcció, pots ignorar aquest missatge.
+
+
+ Gràcies,
+
+ Equip {{project}}
+
+ Hola,
+
+
+ T'hem enviat aquest correu perquè {{owner}} et vol convidar a formar part
+ de l'equip {{team}} a {{project}}.
+
+
+ Segueix aquest enllaç per unir-te a l'equip {{team}}:
+
+ {{redirect}}
+
+
+ Si no estàs interessat, pots ignorar aquest missatge.
+
+
+ Gràcies,
+
+ Equip {{project}}
+
+ Hola {{name}},
+
+
+ Segueix aquest enllaç per restablir la teva contrasenya de {{project}}.
+
+ {{redirect}}
+
+
+ Si no has demanat restablir la teva contrasenya, pots ignorar aquest missatge.
+
+
+ Gràcies,
+
+ Equip {{project}}
+
+ Hallo {{name}},
+
+
+ bitte folge diesem Link um deine E-Mail Adresse zu verifizieren.
+
+ {{redirect}}
+
+
+ Bitte ignoriere diese Nachricht, wenn du das Verifizieren deiner E-Mail Adresse nicht beantragt hast.
+
+
+ Vielen dank,
+
+ {{project}} Team
+
\ No newline at end of file
diff --git a/app/config/locale/templates/de.email.auth.invitation.tpl b/app/config/locale/templates/de.email.auth.invitation.tpl
new file mode 100644
index 000000000..dc218116a
--- /dev/null
+++ b/app/config/locale/templates/de.email.auth.invitation.tpl
@@ -0,0 +1,27 @@
+
+
+
+ Hallo,
+
+
+ diese E-Mail wurde dir geschickt, weil {{owner}} dich eingeladen hat Teammitglied im Team {{team}} bei {{project}} zu werden.
+
+
+ Folge diesem Link um dem {{team}} Team beizutreten:
+
+ {{redirect}}
+
+
+ Wenn du daran nicht interessiert bist, kannst du diese Nachricht ignorieren.
+
+
+ Vielen dank,
+
+ {{project}} Team
+
+ Hallo {{name}},
+
+
+ Folge diesem Link um dein Passwort für {{project}} zurückzusetzen.
+
+ {{redirect}}
+
+
+ Bitte ignoriere diese Nachricht, wenn du das Zurücksetzen deines Passworts nicht beantragt hast.
+
+
+ Vielen dank,
+
+ {{project}} Team
+
+ Hei {{name}},
+
+
+ Varmista sähköpostiosoite tästä linkistä.
+
+ {{redirect}}
+
+
+ Jos et kysynyt tämän sähköpostiosoitteen varmistamista, voit sivuuttaa tämän viestin.
+
+
+ kiitos,
+
+ {{project}} tiimi
+
\ No newline at end of file
diff --git a/app/config/locale/templates/fi.email.auth.invitation.tpl b/app/config/locale/templates/fi.email.auth.invitation.tpl
new file mode 100644
index 000000000..7e955d021
--- /dev/null
+++ b/app/config/locale/templates/fi.email.auth.invitation.tpl
@@ -0,0 +1,27 @@
+
+
+
+ Hei,
+
+
+ Sait tämän sähköpostin koska {{owner}} halusi kutsua sinut jäseneksi {{team}} tiimiin, täällä {{project}}.
+
+
+ Käytä tätä linkkiä liittyäksesi {{team}} tiimiin:
+
+ {{redirect}}
+
+
+ Jos et ole kiinnostunut, voit sivuuttaa tämän viestin.
+
+
+ kiitos,
+
+ {{project}} tiimi
+
+ Hei {{name}},
+
+
+ Resetoi {{project}} salasana tästä linkistä.
+
+ {{redirect}}
+
+
+ Jos et pyytänyt salasanan nollaamista, voit sivuuttaa tämän viestin-
+
+
+ Kiitos,
+
+ {{project}} tiimi
+
\ No newline at end of file
diff --git a/app/config/locale/templates/fr.email.auth.confirm.tpl b/app/config/locale/templates/fr.email.auth.confirm.tpl
new file mode 100644
index 000000000..21621e237
--- /dev/null
+++ b/app/config/locale/templates/fr.email.auth.confirm.tpl
@@ -0,0 +1,24 @@
+
+
+
+ Bonjour {{name}},
+
+
+ Cliquez sur le lien suivant pour vérifier votre adresse mail.
+
+ {{redirect}}
+
+
+ Si vous n'avez pas demandé une vérification de cette adresse mail, vous pouvez ignorer ce message.
+
+
+ Merci,
+
+ L'équipe {{project}}
+
+ Bonjour,
+
+
+ Ce mail vous a été envoyé car {{owner}} vous invite à devenir membre de l'équipe {{team}} sur le projet {{project}}.
+
+
+ Cliquez sur le lien suivant pour rejoindre l'équipe {{team}}:
+
+ {{redirect}}
+
+
+ Si vous n'êtes pas intéressé, vous pouvez ignorer ce message.
+
+
+ Merci,
+
+ L'équipe {{project}}
+
+ Bonjour {{name}},
+
+
+ Cliquez sur le lien suivant pour réinitialiser votre mot de passe pour le projet {{project}}.
+
+ {{redirect}}
+
+
+ Si vous n'êtes pas à l'origine de cette demande de réinitialisation de mot de passe, vous pouvez ignorer ce message.
+
+
+ Merci,
+
+ L'équipe {{project}}
+
+ Γεια σου {{name}},
+
+
+ Ακολούθησε αυτό τον σύνδεσμο για να επιβεβαιώσεις τη διεύθυνση email σου.
+
+ {{redirect}}
+
+
+ Αν δεν ζήτησες να επιβεβαιώσεις αυτή τη διεύθυνση, μπορείς να αγνοήσεις αυτό το μήνυμα.
+
+
+ Ευχαριστούμε,
+
+ Η ομάδα του {{project}}
+
\ No newline at end of file
diff --git a/app/config/locale/templates/gr.email.auth.invitation.tpl b/app/config/locale/templates/gr.email.auth.invitation.tpl
new file mode 100644
index 000000000..101a1c673
--- /dev/null
+++ b/app/config/locale/templates/gr.email.auth.invitation.tpl
@@ -0,0 +1,27 @@
+
+
+
+ Γεια,
+
+
+ Έλαβες αυτό το email επειδή ο {{owner}} σε προσκάλεσε να γίνεις μέλος της ομάδας {{team}} στο {{project}}.
+
+
+ Ακολούθησε αυτό τον σύνδεσμο για να γίνεις μέλος της ομάδας {{team}}:
+
+ {{redirect}}
+
+
+ Άν δεν ενδιαφέρεσαι, μπορείς να αγνοήσεις αυτό το μήνυμα.
+
+
+ Ευχαριστούμε,
+
+ Η ομάδα του {{project}}
+
+ Γεια σου {{name}},
+
+
+ Ακολούθησε αυτό τον σύνδεσμο για να επαναφέρεις τον κωδικό πρόσβασής σου για το {{project}}.
+
+ {{redirect}}
+
+
+ Άν δεν ζήτησες αλλαγή κωδικού πρόσβασης, μπορείς να αγνοήσεις αυτο το μήνυμα.
+
+
+ Ευχαριστούμε,
+
+ Η ομάδα του {{project}}
+
diff --git a/app/config/locale/templates/he.email.auth.confirm.tpl b/app/config/locale/templates/he.email.auth.confirm.tpl
index ba18e2a06..bc9189a16 100644
--- a/app/config/locale/templates/he.email.auth.confirm.tpl
+++ b/app/config/locale/templates/he.email.auth.confirm.tpl
@@ -10,15 +10,15 @@
שלום {{name}},
- לחץ\י על הלינק הבא על מנת לאמת את החשבון שלך.
+ נא ללחוץ על הקישור שלהלן כדי לאמת את החשבון שלך.
{{redirect}}
- במידה ולא ביקשת לאמת את כתובת המייל הזאת, את\ה יכול\ה להתעלם ממייל זה.
+ אם לא ביקשת לאמת את כתובת הדוא״ל, ניתן להתעלם מההודעה זו.
- תודה,
+ בברכה,
צוות {{project}}
\ No newline at end of file
diff --git a/app/config/locale/templates/he.email.auth.invitation.tpl b/app/config/locale/templates/he.email.auth.invitation.tpl
index ca204cb4c..a7514affd 100644
--- a/app/config/locale/templates/he.email.auth.invitation.tpl
+++ b/app/config/locale/templates/he.email.auth.invitation.tpl
@@ -10,18 +10,18 @@
שלום,
- מייל זה נשלח אליך בגלל ש-{{owner}} רוצה להזמין אותך להפוך לחבר\ת צוות בצוות {{team}} ב-{{project}}.
+ הודעת דוא״ל זו נשלחה אליך כי {{owner}} ביקש להזמינך להצטרף לצוות {{team}} ב־{{project}}.
- בכדי להצטרף לצוות {{team}}, לחץ על הלינק:
+ כדי להצטרף לצוות {{team}}, נא ללחוץ על הקישור:
{{redirect}}
- במידה ואינך מעוניין\ת, אנא התעלם\י ממייל זה.
+ אם איך לך עניין להצטרף לצוות, ניתן להתעלם מהודעת דוא״ל זו.
- תודה,
+ בברכה,
צוות {{project}}
diff --git a/app/config/locale/templates/he.email.auth.recovery.tpl b/app/config/locale/templates/he.email.auth.recovery.tpl
index 71f7015d3..e349365f0 100644
--- a/app/config/locale/templates/he.email.auth.recovery.tpl
+++ b/app/config/locale/templates/he.email.auth.recovery.tpl
@@ -10,15 +10,15 @@
שלום {{name}},
- לחץ\י על הלינק בכדי לאפס את הסיסמא שלך ב-{{project}}.
+ נא ללחוץ על הקישור שלהלן כדי לאפס את הסיסמה שלך ב־{{project}}.
{{redirect}}
- במידה ולא ביקשת לאפס את סיסמתך, את\ה יכול\ה להתעלם ממייל זה.
+ אם לא ביקשת לאפס את סיסמתך, ניתן להתעלם מהודעת דוא״ל זו.
- תודה,
+ בברכה,
צוות {{project}}
diff --git a/app/config/locale/templates/hi.email.auth.confirm.tpl b/app/config/locale/templates/hi.email.auth.confirm.tpl
new file mode 100644
index 000000000..a8b2f1008
--- /dev/null
+++ b/app/config/locale/templates/hi.email.auth.confirm.tpl
@@ -0,0 +1,25 @@
+
+
+
+
+नमस्ते {{name}},
+
+
+ अपना ईमेल पता वेरीफाई करने के लिए इस लिंक पर क्लिक करे।
+
+ {{redirect}}
+
+
+ यदि आपने इस ईमेल को वेरीफाई करने के लिए नहीं कहा है, तो आप इस संदेश को अनदेखा कर सकते हैं।
+
+
+ धन्यवाद,
+
+ {{project}} टीम
+
+ नमस्ते,
+
+
+ यह मेल आपको इसलिए भेजा गया था क्योंकि {{owner}} आपको टीम मेंबर बनने के लिए आमंत्रित करना चाहता है {{team}} टीम के लिए {{project}} प्रोजेक्ट पर
+
+
+ टीम {{team}} ज्वाइन करने के लिए इस लिंक पर क्लिक करे :
+
+ {{redirect}}
+
+
+ यदि आप रुचि नहीं रखते हैं, तो आप इस संदेश को अनदेखा कर सकते हैं।
+
+
+ धन्यवाद,
+
+ {{project}} टीम
+
+ नमस्ते {{name}},
+
+
+ {{project}} का पासवर्ड रिसेट करने के लिए लिंक पर क्लिक करे
+
+ {{redirect}}
+
+
+ यदि आपने अपना पासवर्ड रीसेट करने के लिए नहीं कहा है, तो आप इस संदेश को अनदेखा कर सकते हैं।
+
+
+ धन्यवाद,
+
+ {{project}} टीम
+
+ Halo {{name}},
+
+
+ Ikuti link ini untuk memverifikasi alamat email Anda.
+
+ {{redirect}}
+
+
+ Jika Anda tidak meminta untuk memverifikasi alamat ini, Anda dapat mengabaikan pesan ini.
+
+
+ Terima kasih,
+
+ Tim {{project}}
+
\ No newline at end of file
diff --git a/app/config/locale/templates/id.email.auth.invitation.tpl b/app/config/locale/templates/id.email.auth.invitation.tpl
new file mode 100644
index 000000000..7ab49b200
--- /dev/null
+++ b/app/config/locale/templates/id.email.auth.invitation.tpl
@@ -0,0 +1,27 @@
+
+
+
+ Halo,
+
+
+ Email ini dikirimkan kepada Anda karena {{owner}} ingin mengundang Anda untuk menjadi anggota tim {{team}} di {{project}}.
+
+
+ Ikuti link ini untuk bergabung dengan tim {{team}}:
+
+ {{redirect}}
+
+
+ Jika Anda tidak tertarik, Anda dapat mengabaikan pesan ini.
+
+
+ Terima kasih,
+
+ Tim {{project}}
+
+ Halo {{name}},
+
+
+ Ikuti link ini untuk mereset kata sandi {{project}} Anda.
+
+ {{redirect}}
+
+
+ Jika Anda tidak meminta untuk mereset kata sandi Anda, Anda dapat mengabaikan pesan ini.
+
+
+ Terima kasih,
+
+ Tim {{project}}
+
+ Hallo {{name}},
+
+
+ Klink op deze link om uw emailadres te valideren.
+
+ {{redirect}}
+
+
+ Als u niet heeft gevraagd om dit adres te verifiëren, kunt u dit bericht negeren.
+
+
+ Bedankt,
+
+ {{project}} team
+
\ No newline at end of file
diff --git a/app/config/locale/templates/nl.email.auth.invitation.tpl b/app/config/locale/templates/nl.email.auth.invitation.tpl
new file mode 100644
index 000000000..252e104af
--- /dev/null
+++ b/app/config/locale/templates/nl.email.auth.invitation.tpl
@@ -0,0 +1,27 @@
+
+
+
+ Hallo,
+
+
+ Deze mail is naar je gestuurd omdat {{owner}} wilde dat u een lid zou worden in het {{team}} team voor {{project}}.
+
+
+ Volg deze link om het team te joinen {{team}}:
+
+ {{redirect}}
+
+
+ ALs u niet geïnteresseerd bent, kunt u dit bericht negeren.
+
+
+ Bedankt,
+
+ {{project}} team
+
+ Hallo {{name}},
+
+
+ Klik op deze link om uw {{project}} wachtwoord te resetten.
+
+ {{redirect}}
+
+
+ Als u niet gevraagd heeft om uw wachtwoord te resetten, kunt u dit bericht negeren.
+
+
+ Bedankt,
+
+ {{project}} team
+
+ Hei {{name}},
+
+
+ Følg denne lenken for å verifisere din e-postadresse.
+
+ {{redirect}}
+
+
+ Hvis du ikke har spurt om å verifisere din e-post, kan du ignorere denne meldingen.
+
+
+ Hilsen,
+
+ {{project}}-teamet
+
\ No newline at end of file
diff --git a/app/config/locale/templates/no.email.auth.invitation.tpl b/app/config/locale/templates/no.email.auth.invitation.tpl
new file mode 100644
index 000000000..c56e913d3
--- /dev/null
+++ b/app/config/locale/templates/no.email.auth.invitation.tpl
@@ -0,0 +1,28 @@
+
+
+
+ Hei,
+
+
+ Denne mailen ble sendt til deg fordi {{owner}} har invitert deg til å bli medlem av {{team}}-teamet på {{project}}.
+
+
+ Follow this link to join the {{team}} team:
+ Følg denne lenken for å bli med på {{team}}-teamet:
+
+ {{redirect}}
+
+
+ Hvis du ikke er interresert kan du ignorere denne meldingen.
+
+
+ Hilsen,
+
+ {{project}}-teamet
+
+ Hei {{name}},
+
+
+ Follow this link to reset your {{project}} password.
+ Følg denne lenken for å tilbakestille ditt {{project}}-passord.
+
+ {{redirect}}
+
+
+ Hvis du ikke har spurt om å tilbakestille passordet ditt, kan du ignorere denne meldingen.
+
+
+ Hilsen,
+
+ {{project}}-teamet
+
+ Olá {{name}},
+
+
+ Por favor, confirme o seu email através do link abaixo.
+
+ {{redirect}}
+
+
+ Se não solicitou a confirmação de email, por favor ignore esta mensagem.
+
+
+ Com os melhores cumprimentos,
+
+ Equipa {{project}}
+
\ No newline at end of file
diff --git a/app/config/locale/templates/pt-pt.email.auth.invitation.tpl b/app/config/locale/templates/pt-pt.email.auth.invitation.tpl
new file mode 100644
index 000000000..e4ebbfa35
--- /dev/null
+++ b/app/config/locale/templates/pt-pt.email.auth.invitation.tpl
@@ -0,0 +1,27 @@
+
+
+
+ Olá,
+
+
+ Recebeu este email porque {{owner}} deseja convida-lo a tornar-se membro da equipa {{team}} no {{project}}.
+
+
+ Use este link para se juntar à equipa {{team}}:
+
+ {{redirect}}
+
+
+ Se não estiver interessado, por favor ignore esta mensagem.
+
+
+ Com os melhores cumprimentos,
+
+ Equipe {{project}}
+
+ Olá {{name}},
+
+
+ Use este link para repor a sua palavra-passe {{project}}.
+
+ {{redirect}}
+
+
+ Se não solicitou a reposição da sua palavra-passe, por favor ignore esta mensagem.
+
+
+ Com os melhores cumprimentos,
+
+ Equipa {{project}}
+
+ Salut {{name}},
+
+
+ Accesează link-ul următor pentru a-ți confirma mail-ul.
+
+ {{redirect}}
+
+
+ Dacă nu ai solicitat acest mail, te rugăm frumos să îl ignori.
+
+
+ Mulțumim,
+
+ Echipa {{project}}
+
+ Salut,
+
+
+ Ai primit acest mail deoarece {{owner}} te-a invitat să faci parte din echipa {{team}} în proiectul {{project}}.
+
+
+ Accesează link-ul următor pentru a accepta invitația în echipa {{team}}:
+
+ {{redirect}}
+
+
+ Dacă nu ești interesat de această invitație, te rugăm frumos să o ignori.
+
+
+ Cu drag,
+
+ Echipa {{project}}
+
+ Salut {{name}},
+
+
+ Accesează link-ul următor pentru a-ți reseta parola din proiectul {{project}}.
+
+ {{redirect}}
+
+
+ Dacă nu ai solicitat acest mail, te rugăm frumos să îl ignori.
+
+
+ Cu drag,
+
+ Echipa {{project}}
+
+ Merhaba {{name}},
+
+
+ Aşağıdaki bağlantıyı takip ederek email hesabınızı doğrulayın.
+
+ {{redirect}}
+
+
+ Bu adresi doğrulamayı istemediyseniz, bu mesajı yok sayabilirsiniz.
+
+
+ Teşekkürler,
+
+ {{project}} takımı
+
\ No newline at end of file
diff --git a/app/config/locale/templates/tr.email.auth.invitation.tpl b/app/config/locale/templates/tr.email.auth.invitation.tpl
new file mode 100644
index 000000000..07e8f06db
--- /dev/null
+++ b/app/config/locale/templates/tr.email.auth.invitation.tpl
@@ -0,0 +1,27 @@
+
+
+
+ Merhaba,
+
+
+ Bu posta size gönderildi, çünkü {{owner}} sizi {{project}} için {{team}} ekibinde takım üyesi olmaya davet etmek istedi.
+
+
+ Aşağıdaki bağlantıyı takip ederek {{team}} takımına takılın:
+
+ {{redirect}}
+
+
+ Eğer ilgilenmiyorsanız, bu mesajı yok sayabilirsiniz.
+
+
+ Teşekkürler,
+
+ {{project}} takımı
+
+ Вітаємо {{name}},
+
+
+ Перейдіть за цим посиланням, та підтвердіть свою електронну адресу
+
+ {{redirect}}
+
+
+ Якщо ви не запитували підтвердження цієї адреси, проігноруйте це повідомлення.
+
+
+ Дякуємо,
+
+ команда {{project}}
+
\ No newline at end of file
diff --git a/app/config/locale/templates/ua.email.auth.invitation.tpl b/app/config/locale/templates/ua.email.auth.invitation.tpl
new file mode 100644
index 000000000..8daaecbaa
--- /dev/null
+++ b/app/config/locale/templates/ua.email.auth.invitation.tpl
@@ -0,0 +1,27 @@
+
+
+
+ Вітаємо,
+
+
+ Цей лист був надісланий вам тому що {{owner}} хоче запросити вас стати членом команди {{team}} у {{project}}.
+
+
+ Перейдіть за цим посиланням щоб приєднатись до команди {{team}} :
+
+ {{redirect}}
+
+
+ Якщо ви не зацікавлені, проігноруйте це повідомлення.
+
+
+ Дякуємо,
+
+ Команда {{project}}
+
+ Вітаємо, {{name}},
+
+
+ Перейдіть за цим посиланням для того щоб скинути свій пароль для {{project}} .
+
+ {{redirect}}
+
+
+ Якщо ви не запитували скидання паролю, проігноруйте це повідомлення.
+
+
+ Дякуємо,
+
+ команда {{project}}
+
diff --git a/app/views/layouts/default.phtml b/app/views/layouts/default.phtml
index 2d0b97eea..b46f53d46 100644
--- a/app/views/layouts/default.phtml
+++ b/app/views/layouts/default.phtml
@@ -27,7 +27,7 @@ $canonical = $this->getParam('canonical', '');
-
+
getParam('prefetch', []) as $prefetch): ?>
@@ -63,7 +63,7 @@ $canonical = $this->getParam('canonical', '');
PAGING_LIMIT:
};
-
+
document.addEventListener("DOMContentLoaded", function() {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
diff --git a/app/views/proxy.phtml b/app/views/proxy.phtml
index fea038840..0021f5558 100644
--- a/app/views/proxy.phtml
+++ b/app/views/proxy.phtml
@@ -9,7 +9,7 @@
$list = [];
foreach ($clients as $client) {
- if(empty($client)) {
+ if (empty($client)) {
continue;
}
diff --git a/build.sh b/build.sh
index 7f5ed112a..e4364c45d 100644
--- a/build.sh
+++ b/build.sh
@@ -15,7 +15,7 @@ fi
echo "Setting Version #"
-echo -e " app/config/version.php
+echo -e " app/config/version.php
echo 'Updating PHP dependencies and auto-loading...'
diff --git a/composer.lock b/composer.lock
index c1a3f41e5..78cfe6133 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,6 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "cf3e9453a93f3ee5cfec76f6cd6bc139",
"content-hash": "470f543ebf989400a43a6269f0b4d60a",
"packages": [
{
@@ -93,15 +92,7 @@
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator",
-<<<<<<< HEAD
-<<<<<<< HEAD
- "reference": "2cdf218f735e5c52a47f1d8977f460261fd9017f"
-=======
- "reference": "22cd594e2406fbcfc64262fdcdfa78069bf29aa0"
->>>>>>> upstream/master
-=======
- "reference": "22cd594e2406fbcfc64262fdcdfa78069bf29aa0"
->>>>>>> upstream/master
+ "reference": "233b9a9e3626c9490d490ffdbdc09c3439eb1747"
},
"require": {
"ext-curl": "*",
@@ -131,15 +122,7 @@
}
],
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
-<<<<<<< HEAD
-<<<<<<< HEAD
- "time": "2019-09-22 12:47:11"
-=======
- "time": "2019-09-28 23:31:14"
->>>>>>> upstream/master
-=======
- "time": "2019-09-28 23:31:14"
->>>>>>> upstream/master
+ "time": "2019-10-01 12:00:26"
},
{
"name": "bacon/bacon-qr-code",
@@ -188,7 +171,7 @@
],
"description": "BaconQrCode is a QR code generator for PHP.",
"homepage": "https://github.com/Bacon/BaconQrCode",
- "time": "2018-04-25 17:53:56"
+ "time": "2018-04-25T17:53:56+00:00"
},
{
"name": "chrisboulton/php-resque",
@@ -321,7 +304,7 @@
],
"description": "Credis is a lightweight interface to the Redis key-value store which wraps the phpredis library when available for better performance.",
"homepage": "https://github.com/colinmollenhour/credis",
- "time": "2019-03-05 16:29:14"
+ "time": "2019-03-05T16:29:14+00:00"
},
{
"name": "composer/ca-bundle",
@@ -419,7 +402,7 @@
"enum",
"map"
],
- "time": "2017-10-25 22:45:27"
+ "time": "2017-10-25T22:45:27+00:00"
},
{
"name": "domnikl/statsd",
@@ -466,7 +449,7 @@
"statsd",
"udp"
],
- "time": "2014-12-09 09:37:49"
+ "time": "2014-12-09T09:37:49+00:00"
},
{
"name": "dragonmantank/cron-expression",
@@ -515,7 +498,7 @@
"cron",
"schedule"
],
- "time": "2018-06-06 03:12:17"
+ "time": "2018-06-06T03:12:17+00:00"
},
{
"name": "geoip2/geoip2",
@@ -567,7 +550,7 @@
"geolocation",
"maxmind"
],
- "time": "2018-04-10 15:32:59"
+ "time": "2018-04-10T15:32:59+00:00"
},
{
"name": "guzzlehttp/guzzle",
@@ -816,7 +799,7 @@
"influxdb library",
"time series"
],
- "time": "2019-05-30 00:15:14"
+ "time": "2019-05-30T00:15:14+00:00"
},
{
"name": "matthiasmullie/minify",
@@ -876,7 +859,7 @@
"minifier",
"minify"
],
- "time": "2018-11-26 23:10:39"
+ "time": "2018-11-26T23:10:39+00:00"
},
{
"name": "matthiasmullie/path-converter",
@@ -925,29 +908,30 @@
"paths",
"relative"
],
- "time": "2018-10-25 15:19:41"
+ "time": "2018-10-25T15:19:41+00:00"
},
{
"name": "maxmind-db/reader",
- "version": "v1.4.1",
+ "version": "v1.5.0",
"source": {
"type": "git",
"url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git",
- "reference": "eb83d0ee1c1f9b8a340206302136bc81ee02ae74"
+ "reference": "bd436094fc0a9b0558a899fb80b0ae34fe1808a0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/eb83d0ee1c1f9b8a340206302136bc81ee02ae74",
- "reference": "eb83d0ee1c1f9b8a340206302136bc81ee02ae74",
+ "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/bd436094fc0a9b0558a899fb80b0ae34fe1808a0",
+ "reference": "bd436094fc0a9b0558a899fb80b0ae34fe1808a0",
"shasum": ""
},
"require": {
- "php": ">=5.4"
+ "php": ">=5.6"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.*",
- "phpunit/phpunit": "4.* || 5.*",
- "satooshi/php-coveralls": "1.0.*",
+ "php-coveralls/php-coveralls": "^2.1",
+ "phpunit/phpcov": "^3.0",
+ "phpunit/phpunit": "5.*",
"squizlabs/php_codesniffer": "3.*"
},
"suggest": {
@@ -969,7 +953,7 @@
{
"name": "Gregory J. Oschwald",
"email": "goschwald@maxmind.com",
- "homepage": "http://www.maxmind.com/"
+ "homepage": "https://www.maxmind.com/"
}
],
"description": "MaxMind DB Reader API",
@@ -981,7 +965,7 @@
"geolocation",
"maxmind"
],
- "time": "2019-01-04 19:55:56"
+ "time": "2019-09-30T22:56:38+00:00"
},
{
"name": "maxmind/web-service-common",
@@ -1027,7 +1011,7 @@
],
"description": "Internal MaxMind Web Service API",
"homepage": "https://github.com/maxmind/web-service-common-php",
- "time": "2018-02-12 22:31:54"
+ "time": "2018-02-12T22:31:54+00:00"
},
{
"name": "mustangostang/spyc",
@@ -1143,7 +1127,7 @@
}
],
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
- "time": "2019-02-01 15:04:28"
+ "time": "2019-02-01T15:04:28+00:00"
},
{
"name": "piwik/device-detector",
@@ -1194,7 +1178,7 @@
"parser",
"useragent"
],
- "time": "2016-01-21 22:26:37"
+ "time": "2016-01-21T22:26:37+00:00"
},
{
"name": "psr/http-message",
@@ -1331,7 +1315,7 @@
}
],
"description": "A polyfill for getallheaders.",
- "time": "2019-03-08 08:55:37"
+ "time": "2019-03-08T08:55:37+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -1456,16 +1440,16 @@
"source": {
"type": "git",
"url": "https://github.com/twigphp/Twig.git",
- "reference": "c2fd9990fcab344b67a12ead04890a88141d5897"
+ "reference": "4625774716e3737580e407a02e53ff4defd3cdfa"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/twigphp/Twig/zipball/c2fd9990fcab344b67a12ead04890a88141d5897",
- "reference": "c2fd9990fcab344b67a12ead04890a88141d5897",
+ "url": "https://api.github.com/repos/twigphp/Twig/zipball/4625774716e3737580e407a02e53ff4defd3cdfa",
+ "reference": "4625774716e3737580e407a02e53ff4defd3cdfa",
"shasum": ""
},
"require": {
- "php": "^7.1.3",
+ "php": "^7.0",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3"
},
@@ -1515,15 +1499,7 @@
"keywords": [
"templating"
],
-<<<<<<< HEAD
-<<<<<<< HEAD
- "time": "2019-09-20 12:53:54"
-=======
- "time": "2019-09-20T12:53:54+00:00"
->>>>>>> upstream/master
-=======
- "time": "2019-09-20T12:53:54+00:00"
->>>>>>> upstream/master
+ "time": "2019-10-01T10:31:38+00:00"
},
{
"name": "utopia-php/abuse",
@@ -1803,8 +1779,6 @@
"utopia"
],
"time": "2019-05-08T20:25:57+00:00"
-<<<<<<< HEAD
-=======
}
],
"packages-dev": [
@@ -3222,10 +3196,8 @@
"validate"
],
"time": "2019-08-24T08:43:50+00:00"
->>>>>>> upstream/master
}
],
- "packages-dev": null,
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
diff --git a/docs/AddOAuthProvider.md b/docs/AddOAuthProvider.md
index b25e25195..bca7d3bc8 100644
--- a/docs/AddOAuthProvider.md
+++ b/docs/AddOAuthProvider.md
@@ -6,44 +6,44 @@ This document is part of the Appwrite contributors' guide. Before you continue r
### Agenda
-OAuth providers help users to log in easily to apps and websites without the need to provide passwords or any other type of credentials. Appwrite goal is to have support to as many **major** OAuth providers as possible.
+OAuth providers help users to log in easily to apps and websites without the need to provide passwords or any other type of credentials. Appwrite goal is to have support from as many **major** OAuth providers as possible.
-As of the writing of these lines, we do not accept any minor OAuth providers. For us to accept smaller and potentially unlimited number of providers some product design and software architecture changes must be applied first.
+As of the writing of these lines, we do not accept any minor OAuth providers. For us to accept some smaller and potentially unlimited number of OAuth providers, some product design and software architecture changes must be applied first.
### List Your new Provider
-The first step in adding a new OAuth provider is to list it in providers config file array, located at:
+The first step to follow in adding a new OAuth provider is to add it to the list in providers config file array, located at:
```
./app/config/providers.php
```
-Make sure to fill all data needed and that your provider array key name is in camelcase format and has no spaces or special characters.
+Make sure to fill all data needed and that your provider array key name is in camelCase format and has no spaces or special characters.
### Add Provider Logo
-Add a logo image to your new provider in this path: ./public/images/oauth. Your logo should be a png 100X100px file with the name ofyour provider (all lowercase). Please make sure to leave about 20px padding around the logo to be consistent with other logos.
+Add a logo image to your new provider in this path: `./public/images/oauth`. Your logo should be a png 100×100px file with the name of your provider (all lowercase). Please make sure to leave about 20px padding around the logo to be consistent with other logos.
### Add Provider Class
-Once finished setting all the metadata for the new provider you need to start coding.
+Once you have finished setting up all the metadata for the new provider, you need to start coding.
Create a new class that extends the basic OAuth provider abstract class in this location:
```bash
-src/Auth/OAuth/ProviderName
+./src/Auth/OAuth/ProviderName
```
Note that the class name should start with a capital letter as PHP FIG standards suggest.
-Once created a new class you can start to implement your new provider login flow. The best way to do this right is to have a look at another provider implementation and try to follow the same standards.
+Once a new class is created, you can start to implement your new provider's login flow. The best way to do this right is to have a look at another provider's implementation and try to follow the same standards.
-Please mention in your documentation what resources or API docs you used to implement the provider OAuth protocol.
+Please mention in your documentation what resources or API docs you used to implement the provider's OAuth protocol.
### Test Your Provider
-After you finished adding your new provider to Appwrite you should be able to see it in your Appwrite console. Navigate to 'Project>Users>Providers' and check your new provider's settings form.
+After you finished adding your new provider to Appwrite you should be able to see it in your Appwrite console. Navigate to 'Project > Users > Providers' and check your new provider's settings form.
-Add credentials and check both a successful and a failed login (where user reject integration on provider page).
+Add credentials and check both a successful and a failed login (where the user rejects integration on provider page).
-If everything goes well, just send us the pull request and be responsive if any feedback arise during our code review.
\ No newline at end of file
+If everything goes well, just send us the pull request and be ready to respond to any feedback which can arise during our code review.
diff --git a/public/images/oauth/bitbucket.png b/public/images/oauth/bitbucket.png
new file mode 100644
index 000000000..8c7442e9e
Binary files /dev/null and b/public/images/oauth/bitbucket.png differ
diff --git a/public/images/oauth/google.png b/public/images/oauth/google.png
index cd60f3a11..de66a7b99 100644
Binary files a/public/images/oauth/google.png and b/public/images/oauth/google.png differ
diff --git a/src/Auth/OAuth.php b/src/Auth/OAuth.php
index ec1ae9eff..70d7f448c 100644
--- a/src/Auth/OAuth.php
+++ b/src/Auth/OAuth.php
@@ -99,7 +99,7 @@ abstract class OAuth
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
}
- $headers[] = "Content-length: ".strlen($payload);
+ $headers[] = 'Content-length: '.strlen($payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
// Send the request & save response to $response
diff --git a/src/Auth/OAuth/Bitbucket.php b/src/Auth/OAuth/Bitbucket.php
new file mode 100644
index 000000000..b0e9969c1
--- /dev/null
+++ b/src/Auth/OAuth/Bitbucket.php
@@ -0,0 +1,132 @@
+appID).
+ '&state=' . urlencode(json_encode($this->state)).
+ '&response_type=code';
+ }
+
+ /**
+ * @param string $code
+ *
+ * @return string
+ */
+ public function getAccessToken(string $code): string
+ {
+ // Required as per Bitbucket Spec.
+ $headers[] = 'Content-Type: application/x-www-form-urlencoded';
+
+ $accessToken = $this->request(
+ 'POST',
+ 'https://bitbucket.org/site/oauth2/access_token',
+ $headers,
+ 'code=' . urlencode($code) .
+ '&client_id=' . urlencode($this->appID) .
+ '&client_secret=' . urlencode($this->appSecret).
+ '&grant_type=authorization_code'
+ );
+
+ $accessToken = json_decode($accessToken, true);
+
+ if (isset($accessToken['access_token'])) {
+ return $accessToken['access_token'];
+ }
+
+ return '';
+ }
+
+ /**
+ * @param string $accessToken
+ *
+ * @return string
+ */
+ public function getUserID(string $accessToken): string
+ {
+ $user = $this->getUser($accessToken);
+
+ if (isset($user['uuid'])) {
+ return $user['uuid'];
+ }
+
+ return '';
+ }
+
+ /**
+ * @param string $accessToken
+ *
+ * @return string
+ */
+ public function getUserEmail(string $accessToken): string
+ {
+ $user = $this->getUser($accessToken);
+
+ if (isset($user['email'])) {
+ return $user['email'];
+ }
+
+ return '';
+ }
+
+ /**
+ * @param string $accessToken
+ *
+ * @return string
+ */
+ public function getUserName(string $accessToken): string
+ {
+ $user = $this->getUser($accessToken);
+
+ if (isset($user['display_name'])) {
+ return $user['display_name'];
+ }
+
+ return '';
+ }
+
+ /**
+ * @param string $accessToken
+ *
+ * @return array
+ */
+ protected function getUser(string $accessToken): array
+ {
+ if (empty($this->user)) {
+ $user = $this->request('GET', 'https://api.bitbucket.org/2.0/user?access_token='.urlencode($accessToken));
+ $this->user = json_decode($user, true);
+
+ $email = $this->request('GET', 'https://api.bitbucket.org/2.0/user/emails?access_token='.urlencode($accessToken));
+ $this->user['email'] = json_decode($email, true)['values'][0]['email'];
+
+ // var_dump($user);
+ // exit();
+ }
+ return $this->user;
+ }
+}
diff --git a/src/Auth/OAuth/Gitlab.php b/src/Auth/OAuth/Gitlab.php
index 923add88f..fbf21a4bd 100644
--- a/src/Auth/OAuth/Gitlab.php
+++ b/src/Auth/OAuth/Gitlab.php
@@ -24,11 +24,11 @@ class Gitlab extends OAuth
*/
public function getLoginURL(): string
{
- return 'https://gitlab.com/oauth/authorize?' .
- 'client_id=' . urlencode($this->appID) .
- '&redirect_uri=' . urlencode($this->callback) .
- '&scope=read_user' .
- '&state=' . urlencode(json_encode($this->state)) .
+ return 'https://gitlab.com/oauth/authorize?'.
+ 'client_id='.urlencode($this->appID).
+ '&redirect_uri='.urlencode($this->callback).
+ '&scope=read_user'.
+ '&state='.urlencode(json_encode($this->state)).
'&response_type=code';
}
@@ -42,10 +42,10 @@ class Gitlab extends OAuth
$accessToken = $this->request(
'POST',
'https://gitlab.com/oauth/token?'.
- 'code=' . urlencode($code) .
- '&client_id=' . urlencode($this->appID) .
- '&client_secret=' . urlencode($this->appSecret) .
- '&redirect_uri=' . urlencode($this->callback) .
+ 'code='.urlencode($code).
+ '&client_id='.urlencode($this->appID).
+ '&client_secret='.urlencode($this->appSecret).
+ '&redirect_uri='.urlencode($this->callback).
'&grant_type=authorization_code'
);
@@ -55,7 +55,6 @@ class Gitlab extends OAuth
return $accessToken['access_token'];
}
-
return '';
}
@@ -115,9 +114,10 @@ class Gitlab extends OAuth
protected function getUser(string $accessToken): array
{
if (empty($this->user)) {
- $user = $this->request('GET', 'https://gitlab.com/api/v4/user?access_token=' . urlencode($accessToken));
+ $user = $this->request('GET', 'https://gitlab.com/api/v4/user?access_token='.urlencode($accessToken));
$this->user = json_decode($user, true);
}
+
return $this->user;
}
}
diff --git a/src/Auth/OAuth/Google.php b/src/Auth/OAuth/Google.php
index 252d629ab..c07758d6b 100644
--- a/src/Auth/OAuth/Google.php
+++ b/src/Auth/OAuth/Google.php
@@ -28,11 +28,11 @@ class Google extends OAuth
*/
public function getLoginURL(): string
{
- return 'https://accounts.google.com/o/oauth2/v2/auth?' .
- 'client_id=' . urlencode($this->appID) .
- '&redirect_uri=' . urlencode($this->callback) .
- '&scope=https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile' .
- '&state=' . urlencode(json_encode($this->state)) .
+ return 'https://accounts.google.com/o/oauth2/v2/auth?'.
+ 'client_id='.urlencode($this->appID).
+ '&redirect_uri='.urlencode($this->callback).
+ '&scope=https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile'.
+ '&state='.urlencode(json_encode($this->state)).
'&response_type=code';
}
@@ -45,12 +45,12 @@ class Google extends OAuth
{
$accessToken = $this->request(
'POST',
- 'https://www.googleapis.com/oauth2/' . $this->version . '/token?' .
- 'code=' . urlencode($code) .
- '&client_id=' . urlencode($this->appID) .
- '&client_secret=' . urlencode($this->appSecret) .
- '&redirect_uri=' . urlencode($this->callback) .
- '&scope=' .
+ 'https://www.googleapis.com/oauth2/'.$this->version.'/token?'.
+ 'code='.urlencode($code).
+ '&client_id='.urlencode($this->appID).
+ '&client_secret='.urlencode($this->appSecret).
+ '&redirect_uri='.urlencode($this->callback).
+ '&scope='.
'&grant_type=authorization_code'
);
@@ -119,9 +119,10 @@ class Google extends OAuth
protected function getUser(string $accessToken): array
{
if (empty($this->user)) {
- $user = $this->request('GET', 'https://www.googleapis.com/oauth2/v2/userinfo?access_token=' . urlencode($accessToken));
+ $user = $this->request('GET', 'https://www.googleapis.com/oauth2/v2/userinfo?access_token='.urlencode($accessToken));
$this->user = json_decode($user, true);
}
+
return $this->user;
}
}
diff --git a/src/Database/Validator/Collection.php b/src/Database/Validator/Collection.php
index 2d58da7bb..dd08a62eb 100644
--- a/src/Database/Validator/Collection.php
+++ b/src/Database/Validator/Collection.php
@@ -40,7 +40,7 @@ class Collection extends Structure
$document = new Document(
array_merge($this->merge, ($document instanceof Document) ? $document->getArrayCopy() : $document)
);
-
+
if (is_null($document->getCollection())) {
$this->message = 'Missing collection attribute $collection';
diff --git a/src/Database/Validator/Structure.php b/src/Database/Validator/Structure.php
index c2753d276..f8d00f1e3 100644
--- a/src/Database/Validator/Structure.php
+++ b/src/Database/Validator/Structure.php
@@ -186,18 +186,19 @@ class Structure extends Validator
}
if (empty($validator)) { // Error creating validator for property
- $this->message = 'Unknown rule type "' . $ruleType . '" for property "' . htmlspecialchars($key, ENT_QUOTES, 'UTF-8') . '"';
-
+ $this->message = 'Unknown rule type "'.$ruleType.'" for property "'.htmlspecialchars($key, ENT_QUOTES, 'UTF-8').'"';
+
if (empty($ruleType)) {
$this->message = 'Unknown property "'.$key.'" type'.
'. Make sure to follow '.strtolower($collection->getAttribute('name', 'unknown')).' collection structure';
}
-
+
return false;
}
if ($ruleRequired && ('' === $value || null === $value)) {
$this->message = 'Required property "'.$key.'" has no value';
+
return false;
}
@@ -211,6 +212,7 @@ class Structure extends Validator
if ($ruleArray) { // Array of values validation
if (!is_array($value)) {
$this->message = 'Property "'.$key.'" must be an array';
+
return false;
}
@@ -219,12 +221,14 @@ class Structure extends Validator
foreach ($value as $node) {
if (!$validator->isValid($node)) { // Check if property is valid, if not required can also be empty
$this->message = 'Property "'.$key.'" has invalid input. '.$validator->getDescription();
+
return false;
}
}
} else { // Single value validation
if ((!$validator->isValid($value)) && !('' === $value && !$ruleRequired)) { // Error when value is not valid, and is not optional and empty
$this->message = 'Property "'.$key.'" has invalid input. '.$validator->getDescription();
+
return false;
}
}
diff --git a/tests/e2e/ConsoleProjectsTest.php b/tests/e2e/ConsoleProjectsTest.php
index e0bd1b39b..3a0b2df8e 100644
--- a/tests/e2e/ConsoleProjectsTest.php
+++ b/tests/e2e/ConsoleProjectsTest.php
@@ -10,8 +10,10 @@ class ConsoleProjectsTest extends BaseConsole
{
$response = $this->register();
+ var_dump($response);
+
$this->assertEquals('http://localhost/success', $response['headers']['location']);
- $this->assertEquals("\n", $response['body']);
+ $this->assertEquals("", $response['body']);
$session = $this->client->parseCookie($response['headers']['set-cookie'])['a-session-console'];
diff --git a/tests/e2e/ConsoleTest.php b/tests/e2e/ConsoleTest.php
index 624b15dd7..6d2a6e4ff 100644
--- a/tests/e2e/ConsoleTest.php
+++ b/tests/e2e/ConsoleTest.php
@@ -10,10 +10,8 @@ class ConsoleTest extends BaseConsole
{
$response = $this->register();
- var_dump($_SERVER);
-
$this->assertEquals('http://localhost/success', $response['headers']['location']);
- $this->assertEquals("\n", $response['body']);
+ $this->assertEquals("", $response['body']);
return [
'email' => $this->demoEmail,
@@ -39,7 +37,7 @@ class ConsoleTest extends BaseConsole
$session = $this->client->parseCookie($response['headers']['set-cookie'])['a-session-console'];
$this->assertEquals('http://localhost/success', $response['headers']['location']);
- $this->assertEquals("\n", $response['body']);
+ $this->assertEquals("", $response['body']);
return [
'email' => $data['email'],
diff --git a/tests/e2e/ProjectDatabaseTest.php b/tests/e2e/ProjectDatabaseTest.php
index e253e89d5..890795ce4 100644
--- a/tests/e2e/ProjectDatabaseTest.php
+++ b/tests/e2e/ProjectDatabaseTest.php
@@ -11,7 +11,7 @@ class ProjectDatabaseTest extends BaseProjects
$response = $this->register();
$this->assertEquals('http://localhost/success', $response['headers']['location']);
- $this->assertEquals("\n", $response['body']);
+ $this->assertEquals("", $response['body']);
$session = $this->client->parseCookie($response['headers']['set-cookie'])['a-session-console'];
@@ -64,7 +64,7 @@ class ProjectDatabaseTest extends BaseProjects
$user = $this->projectRegister($project['body']['$uid']);
$this->assertEquals('http://localhost/success', $user['headers']['location']);
- $this->assertEquals("\n", $user['body']);
+ $this->assertEquals("", $user['body']);
return [
'email' => $this->demoEmail,