mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-10 22:34:11 +00:00
🚧 wip
This commit is contained in:
@@ -60,7 +60,8 @@ export async function setResourceUsers(
|
|||||||
|
|
||||||
const { userIds } = parsedBody.data;
|
const { userIds } = parsedBody.data;
|
||||||
|
|
||||||
const parsedParams = setUserResourcesParamsSchema.safeParse(req.params);
|
const parsedParams =
|
||||||
|
setResourcePolicyAccessControlParamsSchema.safeParse(req.params);
|
||||||
if (!parsedParams.success) {
|
if (!parsedParams.success) {
|
||||||
return next(
|
return next(
|
||||||
createHttpError(
|
createHttpError(
|
||||||
@@ -70,7 +71,7 @@ export async function setResourceUsers(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { resourceId } = parsedParams.data;
|
const { resourcePolicyId } = parsedParams.data;
|
||||||
|
|
||||||
await db.transaction(async (trx) => {
|
await db.transaction(async (trx) => {
|
||||||
await trx
|
await trx
|
||||||
@@ -85,14 +86,13 @@ export async function setResourceUsers(
|
|||||||
.returning()
|
.returning()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
});
|
||||||
return response(res, {
|
return response(res, {
|
||||||
data: {},
|
data: {},
|
||||||
success: true,
|
success: true,
|
||||||
error: false,
|
error: false,
|
||||||
message: "Users set for resource successfully",
|
message: "Users set for resource successfully",
|
||||||
status: HttpCode.CREATED
|
status: HttpCode.CREATED
|
||||||
});
|
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
|
|||||||
@@ -276,11 +276,12 @@ export function EditPolicyForm({ hidePolicyNameForm }: EditPolicyFormProps) {
|
|||||||
{/* Name */}
|
{/* Name */}
|
||||||
{!hidePolicyNameForm && <PolicyNameSection />}
|
{!hidePolicyNameForm && <PolicyNameSection />}
|
||||||
{/* <PolicyUsersRolesSection
|
{/* <PolicyUsersRolesSection
|
||||||
form={form}
|
|
||||||
allRoles={allRoles}
|
allRoles={allRoles}
|
||||||
allUsers={allUsers}
|
allUsers={allUsers}
|
||||||
allIdps={allIdps}
|
allIdps={allIdps}
|
||||||
/>
|
/> */}
|
||||||
|
{/*
|
||||||
<PolicyAuthMethodsSection form={form} />
|
<PolicyAuthMethodsSection form={form} />
|
||||||
<PolicyOtpEmailSection
|
<PolicyOtpEmailSection
|
||||||
form={form}
|
form={form}
|
||||||
|
|||||||
Reference in New Issue
Block a user