> Source: https://docs.cyberelements.io/bastion/4.6/Usage/AdminConsoleReference/WorkplaceAccessContracts/

# Access to Workplace contracts

The **Access to Workplace contracts** module carries the contracts granting user groups access to the applications and desktops published by the associated Systancia Workplace server. A contract binds one or several **user groups** to **one application**, **one application group** or **one desktop**, with a validity period, a maximum number of simultaneous instances, **access modes** and, where applicable, time **slots**.

Contracts are shared between both products: a change made in Bastion shows in Workplace, and the other way round.

> **Prerequisite: Workplace association**
>
> This module only appears when the **Workplace association** is active **and** **console merging** is active too.

## Contract list

| Column | Description |
|---|---|
| **Type** | Icon designating the target of the contract. A coloured background marks a contract carrying slots. |
| **Application** | Name of the target, with its icon — application, application group or desktop. |
| **Users group** | First beneficiary group; beyond that, a **+ *n* groups** counter is added. |
| **Beginning date** | Start of validity. |
| **End Date** | End of validity, or **Unlimited**. |
| **Concurrent users** | Maximum number of concurrent instances, or **Unlimited**. |
| **Access modes** | Four indicators: **Web**, **Desktop**, **VD** and **Launcher**. |
| **Systancia Gate** | Two indicators: **Authorized** and **Restricted**. |

Contracts outside their validity period appear **greyed out**. As long as no contract exists, the grid shows **No subscription to display**, followed by a reminder of the conditions to be met before creating one.

A **legend** under the grid explains the icons: **Application group subscription**, **Application subscription**, **Desktop subscription** and **Contract with planning**.

### Toolbar actions

| Action | Availability | Effect |
|---|---|---|
| **+** — tooltip **New subscription** | A target **and** a user group must exist | Opens the form (see chapter [Add a contract](#add-a-contract)). |
| Edit icon — tooltip **Properties** | Selection = 1 | Opens the same form. Double-clicking is equivalent. |
| **×** — tooltip **Delete** | Selection = 1 | Asks **Are you sure you want to remove this subscription?** |
| **Enable** *or* **Disable** | Selection = 1, contract within its validity period | ⚠ The two buttons are **never visible at the same time**: only the one matching the state of the selected contract is shown. |

> **Why the + button may stay inactive**
>
> At least one target and one user group are needed. Failing that, the console explains: **To create a subscription you need at least one application, applications group or desktop.**, or **To create a subscription you need at least one users group.**

### Filters and search

A collapsible **Filters** panel offers a **Type** — **All**, **Application**, **Application group** or **Desktop** — and a **User group**. Beside it, the search field, whose placeholder is **Search**, filters 700 ms after the last keystroke. The grid footer offers an **Items per page:** selector set to `15`, `25` or `50`.

## Add a contract

The **+** button opens the **New Subscription** window, with two tabs: **General Information** and **Authorized slots**.

### General Information tab

The **Contract type** box offers three radio buttons — available **when creating only**:

| Option | Description |
|---|---|
| **for a group of applications** | Application group published in Workplace. Inactive when no group exists. When recursion is active on the Workplace side, the label is completed in red: *(recursion is enabled on contracts publication)*. |
| **For an application** | **Option retained by default.** |
| **For a desktop** | Desktop or desktop group. |

Then come the fields:

| Field | Description |
|---|---|
| **Application** | Mandatory. List of the targets of the retained type; typing a few characters filters it. |
| **User group** | A dual list, with search and a **Select All** button. |
| **Access modes** | Four checkboxes, **all ticked by default**: **Web portal**, **Desktop**, **Virtual desktop** and **Launcher**. |
| **Access from Systancia Gate** | Two checkboxes, **unticked by default**: **Outside publication authorized** and **Restrict access to compliant clients**. The second stays **inactive** until the first is ticked. |
| **Subscription start date:** | Mandatory. Today by default. |
| **Subscription end date:** | Must be later than or equal to the start date. The **Unlimited** checkbox beside it neutralises the field. |
| **Maximum number of simultaneous instances:** | Integer, minimum `1`. The **Unlimited** checkbox neutralises it; for a desktop contract it becomes **Unlimited (to the extent of available clones)** and the maximum is capped by the capacity of the desktop. |

### Authorized slots tab

The tab shows a weekly grid — one row per slot, hours as columns — and three actions: **Add**, **Properties** (also by double-click) and **Delete**, the latter asking **Are you sure you want to remove this time slot?**

The **Edit slot** window consists of three parts:

| Part | Content |
|---|---|
| Checkbox at the top | **Impose the closure of the application when the access slots limit is reached** — **ticked by default**. |
| **Slot type** | Six exclusive radio buttons: **Day of the week**, **Date**, **Day of the month**, **Day of a month**, **Month** and **Months**. Each enables its own picker. |
| **Slots** | Two fields, **Start** and **End**, as `hh:mm`, and an **Add** button stacking the intervals into a grid. |

| Message | Case |
|---|---|
| **Bad time format! (hh:mm)** | The entered time does not have the expected shape. |
| **Error while adding slot: the given slot overlaps an already existing slot.** | The new interval overlaps an existing one. |

> **No slots for a desktop group**
>
> The **Authorized slots** tab does not apply to a contract covering a desktop group; the **General Information** tab recalls it with a warning.

## Edit a contract

Select a contract then click the **Properties** icon (or double-click). The **Edit Subscription** window shows the form again, with **Contract type** no longer editable. On saving, the console shows **Subscription successfully updated.** — and **The new subscription properties have been successfully registered.** for a creation.

## Enable or disable a contract

The visible button — **Enable** or **Disable** according to the state — acts on the **dates** of the contract: enabling brings the start date back to today, disabling moves it to the day after the end date. The rest of the configuration is untouched.

## Delete a contract

Select a contract then click **×** and confirm. For a contract on an **application group** with recursion active on the Workplace side, an update task is launched; the grid reloads when it ends.
