private function NormalizeGrant($grant)
 {
     if (StringUtils::SameText($grant, 'SELECT')) {
         return 'SELECT';
     }
     if (StringUtils::SameText($grant, 'UPDATE')) {
         return 'UPDATE';
     }
     if (StringUtils::SameText($grant, 'INSERT')) {
         return 'INSERT';
     }
     if (StringUtils::SameText($grant, 'DELETE')) {
         return 'DELETE';
     }
     if (StringUtils::SameText($grant, 'ADMIN')) {
         return 'ADMIN';
     }
     return null;
 }
コード例 #2
0
 private function FindDataSourceGrants($userName)
 {
     foreach ($this->dataSourceGrants as $name => $grants) {
         if (StringUtils::SameText($name, $userName)) {
             return $this->dataSourceGrants[$name];
         }
     }
     return null;
 }