pahekoldap
This commit is contained in:
@@ -5,6 +5,7 @@ import sys
|
|||||||
from lib.paheko import Paheko
|
from lib.paheko import Paheko
|
||||||
from lib.ldap import Ldap
|
from lib.ldap import Ldap
|
||||||
from lib.ssh import Ssh
|
from lib.ssh import Ssh
|
||||||
|
from lib.misc import get_disk_size
|
||||||
|
|
||||||
paheko = Paheko()
|
paheko = Paheko()
|
||||||
categorie_membres = paheko.get_categorie_id("Membres")
|
categorie_membres = paheko.get_categorie_id("Membres")
|
||||||
@@ -16,6 +17,14 @@ def test_services(paheko_entry, ldap_entry):
|
|||||||
if is_orga:
|
if is_orga:
|
||||||
paheko_has_cloud = paheko_entry["cloud"].strip("'") == "Oui"
|
paheko_has_cloud = paheko_entry["cloud"].strip("'") == "Oui"
|
||||||
ldap_cloud_enabled = ldap_entry[1]['nextcloudEnabled'][0] == b"TRUE"
|
ldap_cloud_enabled = ldap_entry[1]['nextcloudEnabled'][0] == b"TRUE"
|
||||||
|
# if (paheko_has_cloud and ldap_cloud_enabled):
|
||||||
|
# path = f"/var/lib/docker/volumes/cloud_cloudData/_data/{ldap_entry[1]['identifiantKaz'][0].decode()}"
|
||||||
|
# size = get_disk_size(path)
|
||||||
|
# if size < 40529249:
|
||||||
|
# print(f"{ldap_entry[1]['identifiantKaz'][0].decode()} {size}")
|
||||||
|
# with Ldap() as ldap:
|
||||||
|
# print(ldap_entry[1]['mail'][0].decode())
|
||||||
|
# ldap.update_user(ldap_entry[1]['mail'][0].decode(), "nextcloudEnabled", b"FALSE")
|
||||||
return not (paheko_has_cloud and ldap_cloud_enabled)
|
return not (paheko_has_cloud and ldap_cloud_enabled)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user