File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,17 +59,19 @@ const confettiDefaults = {
5959// baseURL settings
6060
6161let isInternal = false ,
62- isAdmin = false ;
62+ isAdmin = false ,
63+ isPartner = false ,
64+ isOnlyPartner = false ;
6365
6466if ( typeof skilljarUser !== "undefined" ) {
6567 isInternal = skilljarUser . email . includes ( "@chainguard.dev" ) ;
6668 isAdmin = skilljarUser . email === "kalle.westerling@chainguard.dev" ;
6769}
6870
69- const isPartner =
70- typeof skilljarUserStudentGroups !== "undefined"
71- ? skilljarUserStudentGroups . map ( ( d ) => d . id ) . includes ( "1axsvmzhtbb95" )
72- : false ;
71+ if ( typeof skilljarUserStudentGroups !== "undefined" ) {
72+ isPartner = skilljarUserStudentGroups . map ( ( d ) => d . id ) . includes ( "1axsvmzhtbb95" ) ;
73+ isOnlyPartner = isPartner && skilljarUserStudentGroups . length === 1 ;
74+ }
7375
7476DOMAIN . current = isAdmin ? DOMAIN . stage : DOMAIN . prod ;
7577
@@ -1366,7 +1368,9 @@ function styleCatalog() {
13661368 } else if ( page . isLanding ) {
13671369 sectionName = "home" ;
13681370 } else {
1369- console . warn ( "Could not determine catalog section name, defaulting to home" ) ;
1371+ console . warn (
1372+ "Could not determine catalog section name, defaulting to home"
1373+ ) ;
13701374 sectionName = "home" ;
13711375 }
13721376
You can’t perform that action at this time.
0 commit comments