original_string: private function getAllowedDatabaseResources(&$manifest, $serviceName)
      {
          $manifest['service'][$serviceName][static::REACHABLE_FLAG] = true;
          // Get all schema. This honors RBAC at the service level.
          $result = $this->getAllResources($serviceName, '_schema', ['as_list' => true], null, false);
  
          if (Session::isSysAdmin()) {
              // For admins we have all schemas which apply to tables to
              $manifest['service'][$serviceName]['_schema'] = $result;
              $manifest['service'][$serviceName]['_table'] = $result;
          } else {
              if (!empty($result)) {
                  $manifest['service'][$serviceName]['_schema'] = $result;
              } else {
                  $manifest['service'][$serviceName]['_schema'] = [];
              }
  
              // Get all allowed tables for non-admins
              $result = $this->getAllResources($serviceName, '_table', ['as_list' => true], null, false);
  
              if (!empty($result)) {
                  $manifest['service'][$serviceName]['_table'] = $result;
              } else {
                  $manifest['service'][$serviceName]['_table'] = [];
              }
          }
      }
code: private function getAllowedDatabaseResources(&$manifest, $serviceName)
      {
          $manifest['service'][$serviceName][static::REACHABLE_FLAG] = true;
          // Get all schema. This honors RBAC at the service level.
          $result = $this->getAllResources($serviceName, '_schema', ['as_list' => true], null, false);
  
          if (Session::isSysAdmin()) {
              // For admins we have all schemas which apply to tables to
              $manifest['service'][$serviceName]['_schema'] = $result;
              $manifest['service'][$serviceName]['_table'] = $result;
          } else {
              if (!empty($result)) {
                  $manifest['service'][$serviceName]['_schema'] = $result;
              } else {
                  $manifest['service'][$serviceName]['_schema'] = [];
              }
  
              // Get all allowed tables for non-admins
              $result = $this->getAllResources($serviceName, '_table', ['as_list' => true], null, false);
  
              if (!empty($result)) {
                  $manifest['service'][$serviceName]['_table'] = $result;
              } else {
                  $manifest['service'][$serviceName]['_table'] = [];
              }
          }
      }
code_tokens: private function getAllowedDatabaseResources ( & $ manifest , $ serviceName ) { $ manifest [ 'service' ] [ $ serviceName ] [ static :: REACHABLE_FLAG ] = true ; // Get all schema. This honors RBAC at the service level. $ result = $ this -> getAllResources ( $ serviceName , '_schema' , [ 'as_list' => true ] , null , false ) ; if ( Session :: isSysAdmin ( ) ) { // For admins we have all schemas which apply to tables to $ manifest [ 'service' ] [ $ serviceName ] [ '_schema' ] = $ result ; $ manifest [ 'service' ] [ $ serviceName ] [ '_table' ] = $ result ; } else { if ( ! empty ( $ result ) ) { $ manifest [ 'service' ] [ $ serviceName ] [ '_schema' ] = $ result ; } else { $ manifest [ 'service' ] [ $ serviceName ] [ '_schema' ] = [ ] ; } // Get all allowed tables for non-admins $ result = $ this -> getAllResources ( $ serviceName , '_table' , [ 'as_list' => true ] , null , false ) ; if ( ! empty ( $ result ) ) { $ manifest [ 'service' ] [ $ serviceName ] [ '_table' ] = $ result ; } else { $ manifest [ 'service' ] [ $ serviceName ] [ '_table' ] = [ ] ; } } }
docstring: Gets all DB service resources based on RBAC
  
  @param array  $manifest
  @param string $serviceName
docstring_tokens: Gets all DB service resources based on RBAC