feat: add permission to access to git providers

This commit is contained in:
Mauricio Siu
2024-09-01 18:56:13 -06:00
parent 58aaf6e002
commit 1650e1bb74
11 changed files with 3581 additions and 146 deletions

View File

@@ -1,6 +1,4 @@
import { ShowGitProviders } from "@/components/dashboard/settings/git/show-git-providers";
import { GitlabSetup } from "@/components/dashboard/settings/github/gitlab-setup";
import { ShowDestinations } from "@/components/dashboard/settings/ssh-keys/show-ssh-keys";
import { DashboardLayout } from "@/components/layouts/dashboard-layout";
import { SettingsLayout } from "@/components/layouts/settings-layout";
import { appRouter } from "@/server/api/root";
@@ -14,8 +12,6 @@ const Page = () => {
return (
<div className="flex flex-col gap-4 w-full">
<ShowGitProviders />
{/* <ShowDestinations /> */}
{/* <GitlabSetup /> */}
</div>
);
};
@@ -41,7 +37,7 @@ export async function getServerSideProps(
},
};
}
const { req, res, resolvedUrl } = ctx;
const { req, res } = ctx;
const helpers = createServerSideHelpers({
router: appRouter,
ctx: {
@@ -63,7 +59,7 @@ export async function getServerSideProps(
authId: auth.id,
});
if (!user.canAccessToSSHKeys) {
if (!user.canAccessToGitProviders) {
return {
redirect: {
permanent: true,