@@ -16,37 +16,40 @@ For more information on roles and permissions, see the [Roles and Permissions](.
1616
1717<Tabs >
1818 <TabItem value = " web" label = " Via the Web Interface" default >
19+ ### Via the Web Interface
1920
20- 1 . Login to Infrahub's web interface as an administrator.
21- 2 . Click on ** Admin** in the left side menu.
22- 3 . Navigate to the ** Role Management** section.
23- 4 . In the ** Accounts** tab, click on ** Create Account** .
24- 5 . Fill in the account's details (name, email, and password).
25- 6 . Optionally, assign the account to a group.
26- 7 . Click ** Create** to create the account.
21+ 1 . Log in to the Infrahub UI as an administrator.
22+ 2 . Go to ** Admin > Role Management** in the left side menu.
23+ 3 . In the ** Accounts** tab, click on ** Create Account** .
24+ 4 . Fill in the account's details (name, email, and password).
25+ 5 . Optionally, assign the account to a group.
26+ 6 . Click ** Create** to create the account.
2727
28+ ![ New Account] ( ../media/guides/permissions/permissions_account.png )
2829 </TabItem >
2930
3031 <TabItem value = " graphql" label = " Via the GraphQL Interface" >
31-
32- In the GraphQL sandbox, execute the following mutation to create a new account, replacing the appropriate values as needed:
33- ```graphql
34- mutation AddAccount {
35- CoreAccountCreate (
36- data : {
37- name: {value: " <ACCOUNT-NAME>" },
38- password: {value: " <ACCOUNT-PASSWORD>" }
39- # Optional - Assign the account to an existing group
40- member_of_groups : [{hfid: " Infrahub Users" }]
41- }
42- ) {
43- ok
44- object {
45- hfid
46- }
32+ ### Via the GraphQL Interface
33+
34+ In the GraphQL sandbox, execute the following mutation to create a new account, replacing the appropriate values as needed:
35+
36+ ``` graphql
37+ mutation AddAccount {
38+ CoreAccountCreate (
39+ data : {
40+ name : {value : " <ACCOUNT-NAME>" },
41+ password : {value : " <ACCOUNT-PASSWORD>" }
42+ # Optional - Assign the account to an existing group
43+ member_of_groups : [{hfid : " Infrahub Users" }]
44+ }
45+ ) {
46+ ok
47+ object {
48+ hfid
4749 }
4850 }
49- ```
51+ }
52+ ```
5053
5154 </TabItem >
5255</Tabs >
@@ -55,36 +58,39 @@ In the GraphQL sandbox, execute the following mutation to create a new account,
5558
5659<Tabs >
5760 <TabItem value = " web" label = " Via the Web Interface" default >
61+ ### Via the Web Interface
5862
59- 1 . Login to Infrahub's web interface as an administrator.
60- 2 . Click on ** Admin** in the left side menu.
61- 3 . Navigate to the ** Role Management** section.
62- 4 . In the ** Groups** tab, click on ** Create Account Group** .
63- 5 . Enter a name for the group.
64- 6 . Optionally, assign roles to the group.
65- 7 . Click ** Create** to create the group.
63+ 1 . Log in to the Infrahub UI as an administrator.
64+ 2 . Go to ** Admin > Role Management** in the left side menu.
65+ 3 . In the ** Groups** tab, click on ** Create Account Group** .
66+ 4 . Enter a name for the group.
67+ 5 . Optionally, assign roles to the group.
68+ 6 . Click ** Create** to create the group.
6669
70+ ![ New Group] ( ../media/guides/permissions/permissions_group.png )
6771 </TabItem >
6872
6973 <TabItem value = " graphql" label = " Via the GraphQL Interface" >
74+ ### Via the GraphQL Interface
7075
71- In the GraphQL sandbox, execute the following mutation to create a new group:
72- ```graphql
73- mutation AddGroup {
74- CoreAccountGroupCreate (
75- data : {
76- name : {value: " <GROUP-NAME> " },
77- # Optional - Assign existing roles
78- roles: [{hfid: " General Access " }]
79- }
80- ) {
81- ok
82- object {
83- hfid
84- }
76+ In the GraphQL sandbox, execute the following mutation to create a new group:
77+
78+ ``` graphql
79+ mutation AddGroup {
80+ CoreAccountGroupCreate (
81+ data : {
82+ name : { value : " <GROUP-NAME> " },
83+ # Optional - Assign existing roles
84+ roles : [{ hfid : " General Access " }]
85+ }
86+ ) {
87+ ok
88+ object {
89+ hfid
8590 }
8691 }
87- ```
92+ }
93+ ```
8894
8995 </TabItem >
9096</Tabs >
@@ -93,37 +99,40 @@ In the GraphQL sandbox, execute the following mutation to create a new group:
9399
94100<Tabs >
95101 <TabItem value = " web" label = " Via the Web Interface" default >
102+ ### Via the Web Interface
96103
97- 1 . Login to Infrahub's web interface as an administrator.
98- 2 . Click on ** Admin** in the left side menu.
99- 3 . Navigate to the ** Role Management** section.
100- 4 . In the ** Roles** tab, click on ** Create Account Role** .
101- 5 . Provide a name for the role.
102- 6 . Select the permissions you wish to assign to the role.
103- 7 . Optionally, assign the role to an existing group.
104- 8 . Click ** Create** to create the role.
104+ 1 . Log in to the Infrahub UI as an administrator.
105+ 2 . Go to ** Admin > Role Management** in the left side menu.
106+ 3 . In the ** Roles** tab, click on ** Create Account Role** .
107+ 4 . Provide a name for the role.
108+ 5 . Select the permissions you wish to assign to the role.
109+ 6 . Optionally, assign the role to an existing group.
110+ 7 . Click ** Create** to create the role.
105111
112+ ![ New Role] ( ../media/guides/permissions/permissions_role.png )
106113 </TabItem >
107114
108115 <TabItem value = " graphql" label = " Via the GraphQL Interface" >
116+ ### Via the GraphQL Interface
109117
110- In the GraphQL sandbox, execute the following mutation to create a new role:
111- ```graphql
112- mutation AddRole {
113- CoreAccountRoleCreate (
114- data : {
115- name : {value: " <ROLE-NAME> " },
116- # Optional - Assign the role to an existing group
117- groups: [{hfid: " Infrahub Users " }]
118- }
119- ) {
120- ok
121- object {
122- hfid
123- }
118+ In the GraphQL sandbox, execute the following mutation to create a new role:
119+
120+ ``` graphql
121+ mutation AddRole {
122+ CoreAccountRoleCreate (
123+ data : {
124+ name : { value : " test role" },
125+ # Optional - Assign the role to an existing group
126+ groups : [{ hfid : " Infrahub Users " }]
127+ }
128+ ) {
129+ ok
130+ object {
131+ hfid
124132 }
125133 }
126- ```
134+ }
135+ ```
127136
128137 </TabItem >
129138</Tabs >
@@ -138,39 +147,42 @@ For a complete list of available global and object permissions, see the [Roles a
138147
139148<Tabs >
140149 <TabItem value = " web" label = " Via the Web Interface" default >
150+ ### Via the Web Interface
141151
142- 1 . Login to Infrahub's web interface as an administrator.
143- 2 . Click on ** Admin** in the left side menu.
144- 3 . Navigate to the ** Role Management** section.
145- 4 . In the ** Global Permissions** tab, click on ** Create Global Permission** .
146- 5 . Select the action you which to use.
147- 6 . Select the decision for this action.
148- 7 . Optionally, assign the permission to an existing role.
149- 8 . Click ** Create** to create the permission.
152+ 1 . Log in to the Infrahub UI as an administrator.
153+ 2 . Go to ** Admin > Role Management** in the left side menu.
154+ 3 . In the ** Global Permissions** tab, click on ** Create Global Permission** .
155+ 4 . Select the action you which to use.
156+ 5 . Select the decision for this action.
157+ 6 . Optionally, assign the permission to an existing role.
158+ 7 . Click ** Create** to create the permission.
150159
160+ { /* TODO: Generate this screen*/ }
151161 </TabItem >
152162
153163 <TabItem value = " graphql" label = " Via the GraphQL Interface" >
164+ ### Via the GraphQL Interface
154165
155- In the GraphQL sandbox, execute the following mutation to create a new global permission:
156- ```graphql
157- mutation AddGlobalPermissions {
158- CoreGlobalPermissionCreate (
159- data : {
160- action : {value: " manage_accounts " },
161- # 6 is the enum value for "allow"
162- decision: { value: 6 }
163- }
164- ) {
165- ok
166- object {
167- identifier {
168- value
169- }
166+ In the GraphQL sandbox, execute the following mutation to create a new global permission:
167+
168+ ``` graphql
169+ mutation AddGlobalPermissions {
170+ CoreGlobalPermissionCreate (
171+ data : {
172+ action : { value : " manage_accounts " },
173+ # 6 is the enum value for "allow"
174+ decision : { value : 6 }
175+ }
176+ ) {
177+ ok
178+ object {
179+ identifier {
180+ value
170181 }
171182 }
172183 }
173- ```
184+ }
185+ ```
174186
175187 </TabItem >
176188</Tabs >
@@ -179,41 +191,44 @@ In the GraphQL sandbox, execute the following mutation to create a new global pe
179191
180192<Tabs >
181193 <TabItem value = " web" label = " Via the Web Interface" default >
194+ ### Via the Web Interface
182195
183- 1 . Login to Infrahub's web interface as an administrator.
184- 2 . Click on ** Admin** in the left side menu.
185- 3 . Navigate to the ** Role Management** section.
186- 4 . In the ** Objects Permissions** tab, click on ** Create Object Permission** ..
187- 5 . Provide the namespace and name of the object(s) you want to interact with.
188- 6 . Select the action and decision you wish to use for this permission.
189- 7 . Optionally, assign the permission to an existing role.
190- 8 . Click ** Create** to create the permission.
196+ 1 . Log in to the Infrahub UI as an administrator.
197+ 2 . Go to ** Admin > Role Management** in the left side menu.
198+ 3 . In the ** Objects Permissions** tab, click on ** Create Object Permission** ..
199+ 4 . Provide the namespace and name of the object(s) you want to interact with.
200+ 5 . Select the action and decision you wish to use for this permission.
201+ 6 . Optionally, assign the permission to an existing role.
202+ 7 . Click ** Create** to create the permission.
191203
204+ { /* TODO: Generate this screen*/ }
192205 </TabItem >
193206
194207 <TabItem value = " graphql" label = " Via the GraphQL Interface" >
195-
196- In the GraphQL sandbox, execute the following mutation to create a new global permission:
197- ```graphql
198- mutation AddObjectPermissions {
199- CoreObjectPermissionCreate (
200- data : {
201- namespace: {value: " Builtin" },
202- name: {value: " Tag" },
203- action: {value: " view" },
204- # 4 is the enum value for "allow_other"
205- decision: {value: 4 }
206- }
207- ) {
208- ok
209- object {
210- identifier {
211- value
212- }
208+ ### Via the GraphQL Interface
209+
210+ In the GraphQL sandbox, execute the following mutation to create a new global permission:
211+
212+ ``` graphql
213+ mutation AddObjectPermissions {
214+ CoreObjectPermissionCreate (
215+ data : {
216+ namespace : {value : " Builtin" },
217+ name : {value : " Tag" },
218+ action : {value : " view" },
219+ # 4 is the enum value for "allow_other"
220+ decision : {value : 4 }
221+ }
222+ ) {
223+ ok
224+ object {
225+ identifier {
226+ value
213227 }
214228 }
215229 }
216- ```
230+ }
231+ ```
217232
218233 </TabItem >
219234</Tabs >
0 commit comments