Add API specs to groups endpoints, convert projectId groups endpoints to be slug-based

This commit is contained in:
Tuan Dang
2024-03-28 18:21:12 -07:00
parent 8afecac7d8
commit 9460eafd91
18 changed files with 213 additions and 146 deletions
+2 -1
View File
@@ -118,7 +118,8 @@ export const orgServiceFactory = ({
};
const getOrgGroups = async ({ actor, actorId, orgId, actorAuthMethod, actorOrgId }: TGetOrgGroupsDTO) => {
await permissionService.getOrgPermission(actor, actorId, orgId, actorAuthMethod, actorOrgId);
const { permission } = await permissionService.getOrgPermission(actor, actorId, orgId, actorAuthMethod, actorOrgId);
ForbiddenError.from(permission).throwUnlessCan(OrgPermissionActions.Read, OrgPermissionSubjects.Groups);
const groups = await groupDAL.findByOrgId(orgId);
return groups;
};
+4 -1
View File
@@ -51,7 +51,10 @@ export type TFindAllWorkspacesDTO = {
};
export type TUpdateOrgDTO = {
orgId: string;
data: Partial<{ name: string; slug: string; authEnforced: boolean; scimEnabled: boolean }>;
} & TOrgPermission;
export type TGetOrgGroupsDTO = TOrgPermission;
export type TGetOrgGroupsDTO = {
orgId: string;
} & TOrgPermission;