Skip to content

Commit

Permalink
Merge branch 'master' into bun-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-genesis committed May 13, 2024
2 parents a57581c + 7ef7d1d commit bb56902
Show file tree
Hide file tree
Showing 21 changed files with 241 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ The main advantage of declaring a `customPermissions` function is that you can w

All `customPermissions` functions give you access to a property called `entityDb` that provides access to the [database API](../../../database/database-interface/entity-db/). Additionally, `customPermissions` provides a function parameter that contains the request message itself. This type of this message will vary depending on where the `customPermissions` function has been declared:

* Data Server - the parameter will be of type `Details<DataLogon>`. This message contains all the [options](../../../server/data-server/advanced/#client-side--runtime--options) specified by the client when attempting to create a dataserver subscription, as well as the username.
* Data Server - the parameter will be of type `Details<DataLogon>`. This message contains all the [options](../../../server/data-server/advanced/#incoming-data_logon-messages) specified by the client when attempting to create a dataserver subscription, as well as the username.
* Request Server - the parameter will be of type [GenesisSet](../../03_server/10_network-messages/02_genesisset.mdx), as Request Server definitions can heavily customise the inbound metadata, and it might not necessarily match any pre-existing [generated entity](../../../database/data-types/table-entities/).
* Custom Request Server - the parameter will be of type `Request<V>` where `V` is the class used to define the inbound message. More information about custom Request Servers can be found [here](../../../server/request-server/advanced/#custom-request-servers).
* Event Handler - the parameter will be of type `Event<V>` where `V` is the class used to define the inbound message. This parameter is also present in the `onValidate` and `onCommit` GPAL Event Handler functions.
Expand Down
4 changes: 2 additions & 2 deletions docs/03_server/05_access-control/09_authorisation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ We also define several items on the entity element:
As mentioned above, we will also refresh when either the `ENTITY`, `USER` or `USER_ATTRIBUTES` tables are updated. You will need to define `updateOnUserFields` (see further down) to ensure user data updates are triggered.

:::note
The `user` handle readily available will contain all fields and their values from the `USER` and `USER_ATTRIBUTES` tables, meaning if you add a custom string field `FOO` to `USER_ATTRIBUTES`, `user.getString("FOO")` can be used to access it.)
The `user` handle readily available will contain all fields and their values from the `USER` and `USER_ATTRIBUTES` tables, meaning if you add a custom string field `FOO` to `USER_ATTRIBUTES`, `user.getString("FOO")` can be used to access it.
:::

#### Full example file
Expand Down Expand Up @@ -636,7 +636,7 @@ dynamicPermissions {

## Defining a permission rule using Groovy and XML

All permission rules are held in the **auth-permissions.xml** file. In this file, you define rules against a specific entity, and each entity is defined against a database table.
All permission rules are held in the **auth-permissions.xml** file. In this file, you define rules against a specific entity, and each entity is defined against a database table.

We have a `preExpression` block inside our file, which is applied to all entities. This makes the definition `isUserEnabled` available to all entities.

Expand Down
24 changes: 12 additions & 12 deletions docs/03_server/11_integration/01_rest-endpoints/03_basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ SOURCE_REF: 123456-789041

{
"DETAILS": {
"USER_NAME": "JaneDee",
"PASSWORD": "beONneON*74"
"USER_NAME": "admin",
"PASSWORD": "genesis"
}
}
```
Expand Down Expand Up @@ -106,7 +106,7 @@ POST http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789042
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
{
"DETAILS": {
Expand Down Expand Up @@ -165,7 +165,7 @@ POST http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789042
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
{
"DETAILS": {
Expand Down Expand Up @@ -193,7 +193,7 @@ GET http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789042
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
```

Sample response:
Expand Down Expand Up @@ -258,7 +258,7 @@ POST http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789042
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
{
"DETAILS": {
Expand Down Expand Up @@ -315,7 +315,7 @@ PUT http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789045
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
SUBSCRIPTION_REF: 123456-789042
{
Expand Down Expand Up @@ -344,7 +344,7 @@ GET http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789042
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
```

Response with updated data, including QUANTITY column:
Expand Down Expand Up @@ -392,7 +392,7 @@ PUT http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789045
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
SUBSCRIPTION_REF: 123456-789042
```

Expand Down Expand Up @@ -460,7 +460,7 @@ PUT http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789045
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
SUBSCRIPTION_REF: 123456-789042
{
Expand Down Expand Up @@ -489,7 +489,7 @@ GET http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789042
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
```

```http request
Expand Down Expand Up @@ -555,7 +555,7 @@ DELETE http://localhost:9064/all-trades
Content-Type: application/json
SOURCE_REF: 123456-789042
SESSION_AUTH_TOKEN: G21sF8S9z5J9FTw8iFLk6ZveK9LbMe6h
USER_NAME: JaneDee
USER_NAME: admin
```

And here is an example response:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SOURCE_REF: 123456-789042

{
"DETAILS": {
"USER_NAME": "JaneDee",
"USER_NAME": "admin",
"REFRESH_AUTH_TOKEN": "FmqF9CGzo2MiujEZoiRUjGXh8ybDC62L"
}
}
Expand Down Expand Up @@ -91,7 +91,7 @@ Host: localhost:9064
Content-Type: application/json
SOURCE_REF: 123456-789043
SESSION_ID: 7043f539-160a-418a-be92-d5813a13a5fd
USER_NAME: JaneDee
USER_NAME: admin
```

Sample response:
Expand Down
12 changes: 7 additions & 5 deletions docs/03_server/12_tooling/02_intellij-plugin.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ To configure the database in the plugin, go to the Genesis Tool Window and click
![Open Settings](/img/intellij-plugin/setting-in-toolbar.png)

#### Postgres
For a local PostgreSQL installation using the docker `run` command [below](/#postgres), your settings should look like this:
For a local PostgreSQL installation using the docker `run` command below, your settings should look like this:

![Genesis Settings with Postgres](/img/intellij-plugin/settings-postgres.png)

Expand Down Expand Up @@ -246,9 +246,11 @@ Click on the funnel, to see the options available (below). From there, select **

![Log Filter](/img/intellij-plugin/process-log-filter.png)

The default log level for a process is defined by the `loggingLevel` tag in your application's [**processes.xml** file](../../../server/configuring-runtime/processes/#tags). You can dynamically change this [using the terminal to run the LogLevel script] (#using-the-terminal).

#### Starting processes

Processes can be started using the **Start All Genesis Services** button mentioned [above](#starting-the-front-and-backend).
Processes can be started using the **Start All Genesis Services** button mentioned [above](#starting-the-front-and-back-ends).
You can also be started from the **mon** window.

![Log Filter](/img/intellij-plugin/mon-router-row.png)
Expand Down Expand Up @@ -416,7 +418,7 @@ However, regardless of this setting, the resource daemon will be started wheneve

## Keeping your local Genesis Home in sync

Every Genesis application, whether deployed to a server, or running locally, needs a **home** folder. This folder is the installation location; it includes all dependencies and configuration needed to run the application.
Every Genesis application, whether deployed to a server or running locally, needs a **home** folder. This folder is the installation location; it includes all dependencies and configuration needed to run the application.

There are two ways that this is managed from within the plugin:

Expand Down Expand Up @@ -445,7 +447,7 @@ The benefits of the Gradle mode over the Deploy mode are:
### Deploy mode

:::important
Deployed mode is still supported, but we recommens that you [migrate](/operations/project-structure/settings-plugin/) your project to Gradle mode. This will greatly simplify the user experience in the plugin.
Deployed mode is still supported, but we recommend that you [migrate](/operations/project-structure/settings-plugin/) your project to Gradle mode. This will greatly simplify the user experience in the plugin.

:::

Expand All @@ -463,7 +465,7 @@ This runs a full Gradle build and a `genesisInstall`. (If you run this task in G

### Changing dependencies

After dependencies have been added, you might need to do different things to keep your project up to date. The steps to take depend on [which mode](#different-modes) the plugin is running in.
After dependencies have been added, you might need to do different things to keep your project up to date. The steps to take depend on which Mode the plugin is running in.

It also depends on whether you are adding or changing a Genesis or Business Component dependency.

Expand Down
4 changes: 2 additions & 2 deletions docs/04_web/01_basics/05_package-json-basics.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ When running the app on your local machine, you can adjust a few settings under
```
"config": {
"API_HOST": "wss://dev-position2/gwf/",
"DEFAULT_USER": "JaneDee",
"DEFAULT_PASSWORD": "beONneON*74",
"DEFAULT_USER": "admin",
"DEFAULT_PASSWORD": "genesis",
"PORT": 6060
},
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ DbUser = genesisFdbUser
DbHost = fdb01.my.domain
```

Note, override files are not able to perform environment substitutions in the way that system-definitions can. The override file must be a .kts file (Kotlin script), so it is _executed_, whereas the properties file is only read. See [clusters/Environment variables](../../../operations/clustering/genesis#Environment-variables).
Note, override files are not able to perform environment substitutions in the way that system-definitions can. The override file must be a .kts file (Kotlin script), so it is _executed_, whereas the properties file is only read. See [clusters/Environment variables](../../../operations/clustering/genesis#environment-variables).



Expand Down
8 changes: 5 additions & 3 deletions docs/06_operations/02_infrastructure/01_infrastructure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@ This guide is to assist people responsible for the infrastructure that is used t

Where available, we point to maintained documentation areas.

If you have any questions or concerns, or if you any content in this guide or its links to be incorrect or lacking detail, please raise them with your Genesis Account Technical Contact, who will be happy to discuss and source any details they are not able to answer directly.
If you have any questions or concerns, or if you find any content in this guide or its links to be incorrect or lacking detail, please raise them with your Genesis Account Technical Contact, who will be happy to discuss and source any details they are not able to answer directly.

## Infrastructure for user development

The Genesis platform includes tools and libraries that enable developers to building applications more quickly.
The Genesis platform includes tools and libraries that enable developers to build applications more quickly.

The following gives an overview of where they are hosted and how corporate infrastructure is typically set up to access them.

## Intellij Plugin

Genesis maintains a [plugin](https://plugins.jetbrains.com/plugin/21131-genesis-platform-support) that allows developers to run the full stack of their application locally for early development phases.
Genesis maintains a [plugin](https://plugins.jetbrains.com/plugin/21131-genesis-platform-support) that allows you to run the full stack of your application locally for early development phases.

The plugin is [fully documented in our Server pages](../../../server/tooling/intellij-plugin/).

### Installing via IntelliJ plugin marketplace

Expand Down
Loading

0 comments on commit bb56902

Please sign in to comment.