[inactive-gitlab-users] Drop trust-2fa subcommand
- From: Bartłomiej Piotrowski <bpiotrowski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [inactive-gitlab-users] Drop trust-2fa subcommand
- Date: Wed, 8 Dec 2021 20:42:30 +0000 (UTC)
commit 72becdb01b7d24cc0c77dc0ce3f7e9601aec54ad
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date: Wed Dec 8 21:36:07 2021 +0100
Drop trust-2fa subcommand
inactive-gitlab-users.py | 13 -------------
inactive-gitlab-users.sh | 1 -
2 files changed, 14 deletions(-)
---
diff --git a/inactive-gitlab-users.py b/inactive-gitlab-users.py
index db8939d..c856b26 100644
--- a/inactive-gitlab-users.py
+++ b/inactive-gitlab-users.py
@@ -196,13 +196,6 @@ def trust_all_groups(gl):
trust_user(gl, user.id)
-def trust_2fa_users(gl):
- users = gl.users.list(all=True, two_factor="enabled", as_list=False)
-
- for user in users:
- trust_user(gl, user.id)
-
-
if __name__ == "__main__":
GITLAB_TOKEN = os.getenv("GITLAB_TOKEN")
if GITLAB_TOKEN is None:
@@ -221,10 +214,6 @@ if __name__ == "__main__":
trust_groups = subparsers.add_parser(
"trust-groups", help="mark users which are member of any group as trusted"
)
- trust_2fa = subparsers.add_parser(
- "trust-2fa",
- help="mark users which have two factor authenticated enabled as trusted",
- )
inactive = subparsers.add_parser("get-inactive", help="get inactive users")
inactive.add_argument(
@@ -282,8 +271,6 @@ if __name__ == "__main__":
delete_user(gl, user["id"], user["reason"])
elif args.command == "trust-groups":
trust_all_groups(gl)
- elif args.command == "trust-2fa":
- trust_2fa_users(gl)
elif args.command == "snippets":
delete_snippets_only_users(gl)
else:
diff --git a/inactive-gitlab-users.sh b/inactive-gitlab-users.sh
index 2bd3c2c..fd8339f 100755
--- a/inactive-gitlab-users.sh
+++ b/inactive-gitlab-users.sh
@@ -5,7 +5,6 @@ echo "remove after ${TIMEDELTA_VALUE} ${TIMEDELTA_UNIT}"
echo
python3 /usr/local/bin/inactive-gitlab-users.py trust-groups >/dev/null
-python3 /usr/local/bin/inactive-gitlab-users.py trust-2fa >/dev/null
python3 /usr/local/bin/inactive-gitlab-users.py snippets
python3 /usr/local/bin/inactive-gitlab-users.py get-inactive -t ${TIMEDELTA_UNIT}:${TIMEDELTA_VALUE} >
/tmp/inactive.json
python3 /usr/local/bin/inactive-gitlab-users.py delete-from-json /tmp/inactive.json
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]