diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-06-20 11:22:57 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-06-20 11:22:57 +0000 |
commit | fd7bdc0bf7cfc365c21fb190a7cdb4370f4d1956 (patch) | |
tree | 718db8ceb76355f17afb408669a4953d9b690390 | |
parent | bf84ecbf1bd9061ce7ae127ce0c9dfbe0de127c4 (diff) |
#88434# implement user access rights
-rw-r--r-- | connectivity/source/drivers/adabas/BUser.cxx | 9 | ||||
-rw-r--r-- | connectivity/source/drivers/adabas/BUsers.cxx | 10 |
2 files changed, 12 insertions, 7 deletions
diff --git a/connectivity/source/drivers/adabas/BUser.cxx b/connectivity/source/drivers/adabas/BUser.cxx index 7afe8ca4d446..919ea3ba6eeb 100644 --- a/connectivity/source/drivers/adabas/BUser.cxx +++ b/connectivity/source/drivers/adabas/BUser.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BUser.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: oj $ $Date: 2001-06-20 09:28:50 $ + * last change: $Author: oj $ $Date: 2001-06-20 12:22:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -152,13 +152,14 @@ OUserExtend::OUserExtend( OAdabasConnection* _pConnection,const ::rtl::OUStrin typedef connectivity::sdbcx::OUser OUser_TYPEDEF; void OUserExtend::construct() { - OAdabasUser::construct(); + registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD), PROPERTY_ID_PASSWORD,0,&m_Password,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL))); } // ----------------------------------------------------------------------------- cppu::IPropertyArrayHelper* OUserExtend::createArrayHelper() const { Sequence< Property > aProps; + describeProperties(aProps); return new cppu::OPropertyArrayHelper(aProps); } // ------------------------------------------------------------------------- @@ -290,7 +291,7 @@ void SAL_CALL OAdabasUser::revokePrivileges( const ::rtl::OUString& objName, sal if(sPrivs.getLength()) { ::rtl::OUString sGrant; - sGrant += ::rtl::OUString::createFromAscii("GRANT "); + sGrant += ::rtl::OUString::createFromAscii("REVOKE "); sGrant += sPrivs; sGrant += ::rtl::OUString::createFromAscii(" ON "); Reference<XDatabaseMetaData> xMeta = m_pConnection->getMetaData(); diff --git a/connectivity/source/drivers/adabas/BUsers.cxx b/connectivity/source/drivers/adabas/BUsers.cxx index a2f832640b43..1348693cbc7b 100644 --- a/connectivity/source/drivers/adabas/BUsers.cxx +++ b/connectivity/source/drivers/adabas/BUsers.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BUsers.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: oj $ $Date: 2001-06-20 07:12:08 $ + * last change: $Author: oj $ $Date: 2001-06-20 12:22:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -122,7 +122,11 @@ void SAL_CALL OUsers::appendByDescriptor( const Reference< XPropertySet >& descr ::rtl::OUString aSql = ::rtl::OUString::createFromAscii("CREATE USER "); ::rtl::OUString aQuote = m_pConnection->getMetaData()->getIdentifierQuoteString( ); - aSql = aSql + aQuote + getString(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))) + aQuote + ::rtl::OUString sUserName; + descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= sUserName; + sUserName = sUserName.toAsciiUpperCase(); + descriptor->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),makeAny(sUserName)); + aSql = aSql + aQuote + sUserName + aQuote + ::rtl::OUString::createFromAscii(" PASSWORD ") + getString(descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD))); aSql += ::rtl::OUString::createFromAscii(" RESOURCE NOT EXCLUSIVE"); |