PageSourceSearch

https://vaulticks.com/assets/ProtectedAdminRoute-_lPqyRB4.js

js vaulticks.com collected 2026-09-24 14:56:12 UTC 2,245 bytes, 1 lines download raw bytes

1import{j as e}from"./ui-vendor-efoDfjla.js";import{u as c}from"./index-Dy-yis_s.js";import{B as a}from"./button-CzL7YoXn.js";import{C as l,a as m,b as o,c as d}from"./card-CyUC8zN6.js";import{u as x,N as u}from"./router-vendor-CSWcbrtA.js";import{S as h,y as j,z as f}from"./utils-vendor-BXji2ymy.js";import"./query-vendor-BYBWvLyW.js";const C=({children:r})=>{const{user:s,loading:t,isAdmin:i,login:n}=c();return x(),t?e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-600",children:"Verifying permissions..."})]})}):s?i?e.jsx(e.Fragment,{children:r}):e.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50",children:e.jsxs(l,{className:"w-full max-w-md mx-4",children:[e.jsxs(m,{className:"text-center",children:[e.jsx("div",{className:"mx-auto w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4",children:e.jsx(h,{className:"h-8 w-8 text-red-600"})}),e.jsx(o,{className:"text-xl text-gray-900",children:"Insufficient Permissions"})]}),e.jsxs(d,{className:"text-center space-y-4",children:[e.jsxs("div",{className:"text-gray-600",children:[e.jsx("p",{className:"mb-2",children:"The account you are using does not have administrator rights."}),e.jsxs("div",{className:"bg-gray-100 rounded-lg p-3 mb-4",children:[e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm",children:[e.jsx(j,{className:"h-4 w-4 text-gray-500"}),e.jsxs("span",{className:"text-gray-700",children:["Current account: ",s.email]})]}),e.jsxs("div",{className:"text-xs text-gray-500 mt-1",children:["Role: ",s.role==="user"?"Regular user":s.role]})]}),e.jsx("p",{className:"text-sm",children:"Please log in with an account that has administrator rights."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs(a,{onClick:n,className:"w-full",variant:"outline",children:[e.jsx(f,{className:"h-4 w-4 mr-2"}),"Switch account"]}),e.jsx(a,{onClick:()=>window.history.back(),className:"w-full",variant:"ghost",children:"Go back"})]})]})]})}):e.jsx(u,{to:"/",replace:!0})};export{C as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.