def isAdminFromPrivileges(privileges):
 retVal = (Backend.isDbms(DBMS.PGSQL) and ('super' in privileges))
 retVal |= (Backend.isDbms(DBMS.ORACLE) and ('DBA' in privileges))
 retVal |= (Backend.isDbms(DBMS.MYSQL) and kb.data.has_information_schema and ('SUPER' in privileges))
 retVal |= (Backend.isDbms(DBMS.MYSQL) and (not kb.data.has_information_schema) and ('super_priv' in privileges))
 retVal |= (Backend.isDbms(DBMS.FIREBIRD) and all(((_ in privileges) for _ in ('SELECT', 'INSERT', 'UPDATE', 'DELETE', 'REFERENCES', 'EXECUTE'))))
 return retVal

def isAdminFromPrivileges ( privileges ) : retVal = ( Backend . isDbms ( DBMS . PGSQL ) and ( 'super' in privileges ) ) retVal |= ( Backend . isDbms ( DBMS . ORACLE ) and ( 'DBA' in privileges ) ) retVal |= ( Backend . isDbms ( DBMS . MYSQL ) and kb . data . has_information_schema and ( 'SUPER' in privileges ) ) retVal |= ( Backend . isDbms ( DBMS . MYSQL ) and ( not kb . data . has_information_schema ) and ( 'super_priv' in privileges ) ) retVal |= ( Backend . isDbms ( DBMS . FIREBIRD ) and all ( ( ( _ in privileges ) for _ in ( 'SELECT' , 'INSERT' , 'UPDATE' , 'DELETE' , 'REFERENCES' , 'EXECUTE' ) ) ) ) return retVal
inspects privileges to see if those are coming from an admin user .