Skip to content

Commit c78fd43

Browse files
authored
docs: AI RBAC permissions (#313)
PACT-1814
1 parent b6c33ff commit c78fd43

File tree

3 files changed

+73
-2
lines changed

3 files changed

+73
-2
lines changed

website/docs/docs/ai/index.md

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,65 @@ ERROR: Client error: 403 Forbidden AI credits are exhausted.
141141
The limits and your usage against these limits are not currently visible on the subscription page. This will be added in due course.
142142
:::
143143

144-
## Getting help and providing feedback
144+
## Role Based Access Control (RBAC)
145145

146-
For feedback, feature requests, or assistance with the tool, join our [slack channel](https://pact-foundation.slack.com/archives/C07K2FT0XKK) or speak directly with your Account Manager. For general support, please follow the [usual methods](https://support.smartbear.com/pactflow/message/).
146+
In addition to the [system preference](#enabling-the-feature) that enables AI within your workspace, PactFlow's RBAC model allows you to manage access to specific AI capabilities for your users. For detailed information, refer to the [permissions documentation](/docs/permissions#ai).
147+
148+
By default, users assigned the [User](/docs/permissions/predefined-roles#user) role have access to all AI permissions ([`ai:*`](/docs/permissions#ai)), unless:
149+
150+
- Your account was created prior to the release of the AI feature (September 2024), or
151+
- You have customized your role configuration.
152+
153+
**Granting Access:**
154+
155+
To enable AI access for users, ensure that the assigned role includes either the [`ai:*`](/docs/permissions#ai) permission (granting access to all AI features) or the specific permissions required for the desired functionality.
147156

148157
## Tutorials
149158

150159
We've created an [in-browser tutorial](https://docs.pactflow.io/docs/tutorials#getting-started-with-pactflow-ai) to help you get started with PactFlow's test generation feature.
160+
161+
## Troubleshooting
162+
163+
### "You do not have the necessary permissions to access this resource"
164+
165+
If you encounter the following error:
166+
167+
```
168+
ERROR: Client error: 403 Forbidden You do not have the necessary permissions to access this resource, Required permissions: ai:generation:request-response
169+
```
170+
171+
This indicates that the user does not have the required permissions to access the feature.
172+
173+
**Resolution:**
174+
175+
Ensure the necessary AI [permission](/docs/permissions#ai) is assigned to the user's role. In this example, the `ai:generation:request-response permission` is required. For more details, refer to the [permissions](/docs/permissions#ai) documentation.
176+
177+
### "AI Disabled in System Preferences"
178+
179+
If the error message states that "AI is disabled in system preferences", this means the AI feature has not been enabled for your account.
180+
181+
**Resolution:**
182+
Enable the AI feature by following the steps outlined [above](#enabling-the-feature).
183+
184+
### "AI credits are exhausted"
185+
186+
If you encounter the following error:
187+
```
188+
ERROR: Client error: 403 Forbidden AI credits are exhausted.
189+
```
190+
191+
This indicates that you have exceeded the AI credits on the account and can no longer use any AI features.
192+
193+
**Resolution:**
194+
Upgrade your plan to increase your credit allocation, or wait until the credits reset after 30 days. For more details on usage limits, see the [documentation](#usage-limits).
195+
196+
## Getting help and providing feedback
197+
198+
For feedback, feature requests, or assistance with the tool, join our [slack channel](https://pact-foundation.slack.com/archives/C07K2FT0XKK) or speak directly with your Account Manager. For general support, please follow the [usual methods](https://support.smartbear.com/pactflow/message/).
199+
200+
### "AI is not enabled for your plan"
201+
202+
If the error message states that "AI features are not enabled on your plan", your plan does not include AI features as part of its entitlements.
203+
204+
**Resolution:**
205+
Upgrade to a plan that has AI enabled.

website/docs/docs/permissions/permissions.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ _Eligible plans: Enterprise_
66

77
Note that "manage" permissions cover both read and write operations.
88

9+
## ai:*
10+
Provides access to all AI-related features, including all future permissions created under the `ai:` scope.
11+
12+
## ai:generation:*
13+
Can generate Pact tests from all current and future supported inputs.
14+
15+
## ai:generation:openapi
16+
Can generate Pact tests based on user-provided OpenAPI descriptions.
17+
18+
## ai:generation:code
19+
Can generate Pact tests based on user-provided client code.
20+
21+
## ai:generation:request-response
22+
Can generate Pact tests based on recorded request-response pairs.
23+
924
## authentication_settings:manage
1025

1126
Manage authentication settings, such as configuring SSO via Github or Google.

website/docs/docs/permissions/predefined-roles.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ All new users are assigned the `User` role (unless the default role has been upd
3333

3434
#### Default permissions
3535

36+
- [`ai:*`](/docs/permissions#ai)
3637
- [`contract_data:bulk_delete:own`](/docs/permissions#contract_databulk_deleteown)
3738
- [`contract_data:bulk_delete:team`](/docs/permissions#contract_databulk_deleteteam)
3839
- [`contract_data:manage:own`](/docs/permissions#contract_datamanageown)

0 commit comments

Comments
 (0)