File tree 1 file changed +15
-17
lines changed
1 file changed +15
-17
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { pageWithLayout } from "@/layoutTypes";
3
3
import { loginState } from "@/state" ;
4
4
import axios from "axios" ;
5
5
import { useRouter } from "next/router" ;
6
+ import { getConfig } from "@/utils/configEngine" ;
6
7
import { useState , Fragment , useMemo } from "react" ;
7
8
import randomText from "@/utils/randomText" ;
8
9
import { useRecoilState } from "recoil" ;
@@ -26,30 +27,27 @@ type Form = {
26
27
27
28
export const getServerSideProps = withPermissionCheckSsr (
28
29
async ( { req, res, params } ) => {
29
-
30
-
31
-
32
-
33
- const quotas = await prisma . quota . findMany ( {
30
+ const users = await prisma . user . findMany ( {
34
31
where : {
35
- workspaceGroupId : parseInt ( params ?. id as string )
36
- } ,
37
- include : {
38
- assignedRoles : true
32
+ roles : {
33
+ some : {
34
+ workspaceGroupId : parseInt ( params ?. id as string ) ,
35
+ permissions : {
36
+ has : 'represent_alliance'
37
+ }
38
+ }
39
+ }
39
40
}
40
41
} ) ;
41
42
42
- const roles = await prisma . role . findMany ( {
43
- where : {
44
- workspaceGroupId : Number ( params ?. id ) ,
45
- isOwnerRole : false
46
- } ,
47
- } ) ;
43
+
44
+
45
+
46
+
48
47
49
48
return {
50
49
props : {
51
- quotas,
52
- roles
50
+ users
53
51
}
54
52
}
55
53
} , 'manage_activity'
You can’t perform that action at this time.
0 commit comments