2021-04-26 20:07:00 +02:00
|
|
|
#coding:utf-8
|
2022-01-20 17:32:14 +01:00
|
|
|
|
|
|
|
"""
|
|
|
|
ID: issue-2274
|
|
|
|
ISSUE: 2274
|
|
|
|
TITLE: Some standard calls show server installation directory to regular users
|
|
|
|
DESCRIPTION:
|
|
|
|
JIRA: CORE-1845
|
|
|
|
"""
|
2021-04-26 20:07:00 +02:00
|
|
|
|
|
|
|
import pytest
|
2022-01-20 17:32:14 +01:00
|
|
|
from firebird.qa import *
|
2021-11-12 18:29:54 +01:00
|
|
|
from firebird.driver import DatabaseError
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-20 17:32:14 +01:00
|
|
|
db = db_factory()
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-20 17:32:14 +01:00
|
|
|
act = python_act('db')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2022-01-20 17:32:14 +01:00
|
|
|
tmp_user = user_factory('db', name='TMP$C1845', password='QweRtyUi')
|
2021-04-26 20:07:00 +02:00
|
|
|
|
2021-11-12 18:29:54 +01:00
|
|
|
@pytest.mark.version('>=2.5')
|
2022-01-20 17:32:14 +01:00
|
|
|
def test_1(act: Action, tmp_user: User):
|
|
|
|
with act.connect_server(user=tmp_user.name, password=tmp_user.password) as srv:
|
2021-11-12 18:29:54 +01:00
|
|
|
with pytest.raises(DatabaseError, match='.*requires SYSDBA permissions.*'):
|
|
|
|
print(srv.info.security_database)
|
|
|
|
with pytest.raises(DatabaseError, match='.*requires SYSDBA permissions.*'):
|
|
|
|
print(srv.info.home_directory)
|
|
|
|
with pytest.raises(DatabaseError, match='.*requires SYSDBA permissions.*'):
|
|
|
|
print(srv.info.lock_directory)
|
|
|
|
with pytest.raises(DatabaseError, match='.*requires SYSDBA permissions.*'):
|
|
|
|
print(srv.info.message_directory)
|
|
|
|
with pytest.raises(DatabaseError, match='.*requires SYSDBA permissions.*'):
|
|
|
|
print(srv.info.attached_databases)
|
2021-04-26 20:07:00 +02:00
|
|
|
|