mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipa-csreplica-manage: disable connect/disconnect/del with domain level > 0
* ipa-csreplica-manage {connect|disconnect} - a user should use 'ipa
topologysegment-*' commands
* ipa-csreplica-manage del - a user should use ipa-replica-manage del
https://fedorahosted.org/freeipa/ticket/5405
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
This commit is contained in:
@@ -39,6 +39,7 @@ from netaddr.core import AddrFormatError
|
||||
import six
|
||||
|
||||
from ipalib import errors, messages
|
||||
from ipalib.constants import DOMAIN_LEVEL_0
|
||||
from ipalib.text import _
|
||||
from ipapython.ssh import SSHPublicKey
|
||||
from ipapython.dn import DN, RDN
|
||||
@@ -856,3 +857,7 @@ def detect_dns_zone_realm_type(api, domain):
|
||||
|
||||
# If we could not detect type with certainity, return unknown
|
||||
return 'unknown'
|
||||
|
||||
def has_managed_topology(api):
|
||||
domainlevel = api.Command['domainlevel_get']().get('result', DOMAIN_LEVEL_0)
|
||||
return domainlevel > DOMAIN_LEVEL_0
|
||||
|
||||
Reference in New Issue
Block a user