mirror of
https://github.com/andwati/dokploy.git
synced 2026-12-06 01:28:46 +00:00
Update schedule access control to restrict access to owners only
- Modified the `isEnabled` function in the side menu to check if the user has the "owner" role in addition to the non-cloud environment condition. - Updated the server-side props validation in the schedules page to redirect users who are not owners, enhancing security and access control.
This commit is contained in:
@@ -39,7 +39,7 @@ export async function getServerSideProps(
|
||||
};
|
||||
}
|
||||
const { user } = await validateRequest(ctx.req);
|
||||
if (!user) {
|
||||
if (!user || user.role !== "owner") {
|
||||
return {
|
||||
redirect: {
|
||||
permanent: true,
|
||||
|
||||
Reference in New Issue
Block a user