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

Commit

Permalink
GraphQL: Replace list of company role permissions with a structural v…
Browse files Browse the repository at this point in the history
…iew (#8298)

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

* move paragraph

* add whitespace

* Apply suggestions from code review

Co-authored-by: Erik Marr <45772211+erikmarr@users.noreply.github.com>

Co-authored-by: Erik Marr <45772211+erikmarr@users.noreply.github.com>
  • Loading branch information
keharper and erikmarr authored Dec 1, 2020
1 parent 1db2d5f commit bc52214
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 70 deletions.
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 user can access.

{% include webapi/b2b_roles.md %}

Also, you can get the list of all resources defined within the company using the [`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 the [`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

0 comments on commit bc52214

Please sign in to comment.