File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,10 @@ export function useAuth(): boolean {
77  return  ! features . login . open  ||  isUserLoggedIn ( ) ; 
88} 
99
10- export  function  openUsersOnly ( ) : boolean  { 
11-   return  ( 
12-     ( browser  &&  page . url . pathname . includes ( '/discover' ) )  || 
13-     ( ! isUserLoggedIn ( )  &&  features . explorer . open ) 
14-   ) ; 
10+ export  function  isOpenAccess ( ) : boolean  { 
11+   return  ( browser  &&  page . url . pathname . includes ( '/discover' ) )  ||  ! isUserLoggedIn ( ) ; 
1512} 
1613
17- export  function  authorizedUsersOnly ( ) : boolean  { 
14+ export  function  isAuthorizedAccess ( ) : boolean  { 
1815  return  isUserLoggedIn ( )  &&  ! features . explorer . open ; 
1916} 
Original file line number Diff line number Diff line change 55  import  ExportStore  from  ' $lib/stores/Export'  
66  import  { panelOpen  } from  ' $lib/stores/SidePanel'  
77  import  { features  } from  ' $lib/configuration'  
8-   import  { authorizedUsersOnly ,  openUsersOnly  } from  ' $lib/AccessState'  
8+   import  { isAuthorizedAccess ,  isOpenAccess  } from  ' $lib/AccessState'  
99  import  { genericUUID  } from  ' $lib/utilities/UUID'  
1010
1111  let  { exports, addExport, removeExport } =  ExportStore ; 
4545  let  isExported =  $derived ( 
4646    $exports .map ((exp ) =>  exp .conceptPath ).includes (exportItem .conceptPath ), 
4747  ); 
48-   let  shouldDisableFilter =  $derived (! authorizedUsersOnly () &&  ! data .row .allowFiltering ); 
48+   let  shouldDisableFilter =  $derived (! isAuthorizedAccess () &&  ! data .row .allowFiltering ); 
4949script >
5050
5151<button  type ="button"  title ="Information"  class ="btn-icon-color"  onclick ={insertInfoContent }>
7575    <span  class =" sr-only" span >
7676  </button >
7777{/if }
78- {#if  features .explorer .exportsEnableExport  &&  ! openUsersOnly ()}
78+ {#if  features .explorer .exportsEnableExport  &&  ! isOpenAccess ()}
7979  <button 
8080    type =" button" 
8181    title ={isExported  ?  ' Remove from Analysis' :  ' Add for Analysis' 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments