Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

GraphQL: Replace list of company role permissions with a structural view #8298

Merged
merged 4 commits into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 0 additions & 56 deletions src/_includes/b2b/company/company-acl.md

This file was deleted.

12 changes: 5 additions & 7 deletions src/guides/v2.4/graphql/mutations/create-company-role.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ contributor_link: https://www.atwix.com/
b2b_only: true
---

Use the `createCompanyRole` mutation to create a new company role and permissions.
The `createCompanyRole` mutation defines a new company role. To create a role, you must provide an array of permissions that determine which resources the role user can access.

{% include webapi/b2b_roles.md %}

Also, you can get the list of all resources defined within the company using [`company`]({{page.baseurl}}/graphql/queries/company.html) query.

## Syntax

Expand Down Expand Up @@ -121,12 +125,6 @@ Attribute | Data Type | Description
`name` | String! | Role name.
`permissions` | [String!]! | A list of Role permission resources. Required array value for a field with strings as values of array.

### Available permissions

{% include b2b/company/company-acl.md %}

Also, you can get the list of all resources defined within the company using [`company`]({{page.baseurl}}/graphql/queries/company.html) query.

## Output attributes

The `CreateCompanyRoleOutput` output object contains the following attribute:
Expand Down
10 changes: 3 additions & 7 deletions src/guides/v2.4/graphql/mutations/update-company-role.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ b2b_only: true

Use the `updateCompanyRole` mutation to update the company role and permissions.

You can get the role ID with the [`company`]({{page.baseurl}}/graphql/queries/company.html) query.
You can get the role ID and the list of all resources defined within the company using [`company`]({{page.baseurl}}/graphql/queries/company.html) query.

{% include webapi/b2b_roles.md %}

## Syntax

Expand Down Expand Up @@ -163,12 +165,6 @@ Attribute | Data Type | Description
`name` | String | Role name.
`permissions` | [String!] | A list of role permission resources.

### Available permissions

{% include b2b/company/company-acl.md %}

Also, you can get the list of all resources defined within the company using [`company`]({{page.baseurl}}/graphql/queries/company.html) query.

## Output attributes

The `UpdateCompanyRoleOutput` output object contains the following attribute:
Expand Down