Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #110 from ergonode/release/v0.3.0
Browse files Browse the repository at this point in the history
Release/v0.3.0
  • Loading branch information
rprzedzik committed Aug 30, 2019
2 parents 5d18802 + 70d5a04 commit cda9f3c
Show file tree
Hide file tree
Showing 412 changed files with 10,738 additions and 1,097 deletions.
4 changes: 2 additions & 2 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
APP_ENV=dev
APP_HOST=ergonaut.local
APP_HOST=ergonode.local
APP_SCHEME=http
APP_URL=http://ergonaut.local
APP_URL=http://ergonode.local
APP_SECRET=2l386svw9n673j2uj52mqcxr74qj5jnd
DATABASE_URL=pgsql://postgres:[email protected]:5432/ergonode
JWT_PRIVATE_KEY_PATH=config/jwt/private.pem
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## CHANGELOG FOR 0.3.0

- feature [#39](https://github.com/ergonode/backend/issues/39) Add Roles and privileges (rprzedzik)
- feature [#39](https://github.com/ergonode/backend/issues/41) Refactoring user authentication (BastekBielawski)
- feature [#42](https://github.com/ergonode/backend/issues/42) User activity log (rprzedzik)
- improvement [#51](https://github.com/ergonode/backend/issues/51) Improvements in roles and privileges (BastekBielawski)
- feature [#54](https://github.com/ergonode/backend/issues/54) Add all users worklog grid endpoint (rprzedzik)
- experimental [#60](https://github.com/ergonode/backend/issues/60) Deepl - Automatic translations (wiewiurdp)

## CHANGELOG FOR 0.2.0

- feature [#1](https://github.com/ergonode/backend/issues/1) Template designer - layout improvement (rprzedzik)
Expand Down
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<p align="center">
<a href="https://ergonode.com" target="_blank">
<img src="https://img.shields.io/badge/version-0.2.0-4c9aff.svg" alt="Version">
<img src="https://img.shields.io/badge/version-0.3.0-4c9aff.svg" alt="Version">
</a>
<a href="https://ergonode.com" target="_blank">
<img src="https://img.shields.io/badge/version%20code-Vegas-00bc87.svg" alt="Code Version">
Expand Down Expand Up @@ -36,7 +36,9 @@ If you are a new developer and need help, feel-free to ask questions our core te

`@Marcin Piwowarczyk` (product vision and strategy)

`@Rafal Przedzik` (backend architecture and integrations)
`@Rafal Przedzik` (backend architecture)

`@Sebastian Bielawski` (backend integrations)

`@Maciej Kaczorowski` (frontend architecture)

Expand Down Expand Up @@ -96,9 +98,9 @@ On the front side we've used headless approach with Vue.js application. Thanks t
- PHP 7.2
- Symfony 4.2
- Postgres 9.6 (uuid-ossp, ltree)
- RabbitMQ
- Redis
- Elasticsearch
- RabbitMQ (optional)
- Redis (optional)
- Elasticsearch (optional)
- Nginx (possible Apache)
- MongoDB (optional)

Expand Down Expand Up @@ -144,16 +146,25 @@ Generate keys
openssl genrsa -out config/jwt/private.pem -aes256 4096
openssl rsa -pubout -in config/jwt/private.pem -out config/jwt/public.pem
```
While executing above commends you would be asked about password. This password needs to be saved then in .env file in line JWT_PASSPHRASE=yourpassword
While executing above commends you would be asked about password. This password needs to be saved then in .env file in line `JWT_PASSPHRASE=yourpassword`

In terminal execute command which configure application (Available phing commands):
```
bin/phing build
```

If you need basic data in terminal execute command:
```
bin/phing database:fixture
```
or more complex data:
```
bin/phing database:fixture:dev
```

To create user execute console command
```
bin/console ergonode:user:create email name surname password language_code
bin/console ergonode:user:create email name surname password language_code [role]
```
> eg. *bin/console ergonode:user:create [email protected] John Snow 123 EN*
Expand Down Expand Up @@ -197,7 +208,7 @@ Ergonode is open-source, and it can be brought to you only by great community an
Ergonode source code is released under the [OSL 3.0 License][license].

[discord]: https://discord.gg/NntXFa4
[slack]: https://ergonode.slack.com/join/shared_invite/enQtNjE2NTA2ODM2NzIwLWU5NzhmNGM5NDUyYTVlZTI0YWJmMTViYWEyYWU2NDc2NzU4Y2U4ZTc0OTUwYmY0ODVhNzA2ZGE5OTMwOWFlYmM
[slack]: https://join.slack.com/t/ergonode/shared_invite/enQtNzEwMjkwOTQwOTM0LWQ4YWYwMWJmZGExYzQxMGMwZTFjMjg4MjQyNmU3NjY1MWU1OTE1MjA2N2ExMzA1MGQ1ZDJjMzkxMTQzNTBmMGM
[contribut]: http://docs.ergonode.com/#/contribution
[license]: ./LICENSE.txt
[roadmap]: https://ergonode.com/features/#roadmap
Expand Down
24 changes: 20 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</target>

<!-- Behat -->
<target name="test:behat" description="Executes unit tests.">
<target name="test:behat" description="Executes behat tests.">
<echo msg="Running behat tests..."/>
<exec command="bin/behat"
checkreturn="true"
Expand All @@ -58,13 +58,16 @@
>
</exec>
</target>
<!-- cache -->

<!-- Cache -->
<target name="cache:clear" description="Clear cache">
<echo msg="Start clearing cache"/>
<exec command="${dir.console} cache:clear --no-interaction" logoutput="true" checkreturn="true" />
</target>

<!-- Database -->
<target name="database:rebuild" depends="database:drop, database:create, database:migrate, cache:clear" description="Database rebuild"/>

<target name="database:migrate" description="Migrate migrations">
<echo msg="Executing database migrations..."/>
<exec command="${dir.console} ergonode:migrations:migrate --no-interaction --allow-no-migration" logoutput="true" checkreturn="true" />
Expand All @@ -80,17 +83,26 @@
<exec command="${dir.console} doctrine:database:drop --no-interaction --force" logoutput="true" checkreturn="true" />
</target>

<target name="database:fixture" description="Executes unit tests.">
<target name="database:fixture" description="Fill database with basic data">
<echo msg="Fill database with fixtures ..."/>
<exec command="${dir.console} ergonode:fixture:load --no-interaction"
checkreturn="true"
logoutput="true">
</exec>
</target>

<target name="database:fixture:dev" description="Fill database with development data">
<echo msg="Fill database with dev fixtures ..."/>
<exec command="${dir.console} ergonode:fixture:load -g develop --no-interaction"
checkreturn="true"
logoutput="true">
</exec>
</target>

<!-- Code style check -->
<target name="check:style" depends="check:php, check:cs" description="Check code style"/>

<!-- Mess detector -->
<target name="check:md" description="Check PHP Mess Detector">
<phpmd>
<fileset dir="${dir.src}">
Expand All @@ -103,6 +115,7 @@
</phpmd>
</target>

<!-- Copy paste detector -->
<target name="check:cpd" description="Copy Paste Detector.">
<phpcpd>
<fileset dir="${dir.src}">
Expand All @@ -115,6 +128,7 @@
</phpcpd>
</target>

<!-- PHP Stan check -->
<target name="check:phpstan" description="Executes unit tests.">
<echo msg="phpstan analyse level 1 ..."/>
<exec command="bin/phpstan analyse module --level 1"
Expand All @@ -123,6 +137,7 @@
</exec>
</target>

<!-- PHP code style check -->
<target name="check:cs" description="PHPCS checker">
<phpcodesniffer haltonerror="true"
standard="${project.basedir}/vendor/escapestudios/symfony2-coding-standard/Symfony2"
Expand All @@ -143,7 +158,8 @@
</phpcodesniffer>
</target>

<target name="check:php" description="PHPCS checker">
<!-- PHP compatibility check -->
<target name="check:php" description="PHP compatibility check">
<phpcodesniffer haltonerror="true"
standard="${project.basedir}/vendor/wimg/php-compatibility/PHPCompatibility"
allowedFileExtensions="php"
Expand Down
7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"phing/phing": "^2.16",
"ramsey/uuid": "^3.8",
"ramsey/uuid-doctrine": "^1.4",
"scn/deepl-api-connector": " ^2.0",
"sensio/framework-extra-bundle": "^5.3",
"symfony/asset": "^4.2",
"symfony/cache": "^4.2",
Expand Down Expand Up @@ -104,7 +105,8 @@
"Ergonode\\Channel\\": "module/channel/src",
"Ergonode\\Connector\\": "module/connector/src",
"Ergonode\\Value\\": "module/value/src",
"Ergonode\\ConnectorMagento\\": "module/connector-magento/src"
"Ergonode\\ConnectorMagento\\": "module/connector-magento/src",
"Ergonode\\TranslationDeepl\\": "module/translation-deepl/src"
}
},
"autoload-dev": {
Expand Down Expand Up @@ -139,7 +141,8 @@
"Ergonode\\Channel\\Tests\\": "module/channel/tests",
"Ergonode\\Connector\\Tests\\": "module/connector/tests",
"Ergonode\\Value\\Tests\\": "module/value/tests",
"Ergonode\\ConnectorMagento\\Tests\\": "module/connector-magento/tests"
"Ergonode\\ConnectorMagento\\Tests\\": "module/connector-magento/tests",
"Ergonode\\TranslationDeepl\\Tests\\": "module//translation_deepl/tests"
}
},
"replace": {
Expand Down
62 changes: 54 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
Ergonode\Editor\ErgonodeEditorBundle::class => ['all' => true],
Ergonode\Multimedia\ErgonodeMultimediaBundle::class => ['all' => true],
Ergonode\Value\ErgonodeValueBundle::class => ['all' => true],
Ergonode\TranslationDeepl\ErgonodeTranslationDeeplBundle::class => ['all' => true ],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Expand Down
2 changes: 1 addition & 1 deletion config/packages/fos_rest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ fos_rest:
force_redirects:
html: false
failed_validation: 'HTTP_BAD_REQUEST'
default_engine: 'twig'
default_engine: 'twig'
6 changes: 3 additions & 3 deletions config/packages/lexik_jwt_authentication.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
lexik_jwt_authentication:
private_key_path: '%kernel.project_dir%/%env(JWT_PRIVATE_KEY_PATH)%'
public_key_path: '%kernel.project_dir%/%env(JWT_PUBLIC_KEY_PATH)%'
secret_key: '%kernel.project_dir%/%env(JWT_PRIVATE_KEY_PATH)%'
public_key: '%kernel.project_dir%/%env(JWT_PUBLIC_KEY_PATH)%'
pass_phrase: '%env(JWT_PASSPHRASE)%'
token_ttl: '%env(int:JWT_TOKEN_TTL)%'
token_extractors:
# look for a token as Authorization Header
authorization_header:
name: JWTAuthorization
name: 'JWTAuthorization'
30 changes: 28 additions & 2 deletions config/packages/nelmio_api_doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,16 @@ nelmio_api_doc:
example: EN
password:
type: string
equired: true
required: true
example: 12345678
passwordRepeat:
type: string
equired: true
example: 12345678
roleId:
type: string
required: true
example: 86800536-0f2a-4920-9291-f35fdcea3839
tree:
type: object
properties:
Expand Down Expand Up @@ -286,6 +290,28 @@ nelmio_api_doc:
required: true
description: password
example: 123

role:
type: object
properties:
name:
type: string
required: true
description: Role name
example: Role name
description:
type: string
required: true
description: Role description
example: Role Description
privileges:
type: array
items:
type: string
required: false
description: List of role privileges
example:
[ ATTRIBUTE_CREATE, ATTRIBUTE_READ, ATTRIBUTE_UPDATE, ATTRIBUTE_DELETE]
authentication:
type: object
properties:
Expand All @@ -294,6 +320,6 @@ nelmio_api_doc:
required: true
description: JWT token
example: eyJhbGciOiJSUzI1NiJ9.eyJyb2xlcyI6W10sInVzZXJuYW1lIjoidGVzdEBib2xkLm5ldC5wbCIsImlhdCI6MTUyODQ2MzAwOCwiZXhwIjoxNTI4NTQ5NDA4fQ
routes:
areas:
path_patterns:
- ^/api(?!/doc$)
Loading

0 comments on commit cda9f3c

Please sign in to comment.