mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
Added checks for CLOUD_MODE.
This commit is contained in:
parent
5657a64c77
commit
3ac560dc0f
24 changed files with 175 additions and 60 deletions
|
|
@ -1,12 +1,8 @@
|
|||
import AppLayout from 'components/layout/AppLayout';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
|
||||
import UsersList from 'components/pages/settings/users/UsersList';
|
||||
|
||||
export default function UsersPage() {
|
||||
const { adminDisabled } = useConfig();
|
||||
|
||||
if (adminDisabled) {
|
||||
export default function UsersPage({ disabled }) {
|
||||
if (disabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -16,3 +12,11 @@ export default function UsersPage() {
|
|||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
return {
|
||||
props: {
|
||||
disabled: !!process.env.CLOUD_MODE,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue