MCPcopy Index your code
hub / github.com/coder/coder / createCustomRole

Function createCustomRole

site/e2e/api.ts:169–205  ·  view source on GitHub ↗
(
	orgId: string,
	name: string,
	displayName: string,
)

Source from the content-addressed store, hash-verified

167};
168
169export const createCustomRole = async (
170 orgId: string,
171 name: string,
172 displayName: string,
173) => {
174 const role = await API.createOrganizationRole(orgId, {
175 name,
176 display_name: displayName,
177 organization_id: orgId,
178 site_permissions: [],
179 organization_permissions: [
180 {
181 negate: false,
182 resource_type: "organization_member",
183 action: "create",
184 },
185 {
186 negate: false,
187 resource_type: "organization_member",
188 action: "delete",
189 },
190 {
191 negate: false,
192 resource_type: "organization_member",
193 action: "read",
194 },
195 {
196 negate: false,
197 resource_type: "organization_member",
198 action: "update",
199 },
200 ],
201 user_permissions: [],
202 organization_member_permissions: [],
203 });
204 return role;
205};
206
207export async function verifyConfigFlagBoolean(
208 page: Page,

Callers 1

Calls 1

Tested by

no test coverage detected