Browse Source

Revert "Corner cases for admin_promote and admin_demote"

This reverts commit fb9a1fe9a11573fee40598c5929da66d97ca3619.
Yentl Van Tendeloo 7 years ago
parent
commit
02687cb0e2
2 changed files with 5 additions and 16 deletions
  1. 5 3
      bootstrap/core_algorithm.alc
  2. 0 13
      unit/test_all.py

+ 5 - 3
bootstrap/core_algorithm.alc

@@ -2230,9 +2230,11 @@ String function cmd_group_list():
 	result = "Success: "
 	groups = allAssociationDestinations(core, current_user_id, "belongsTo")
 	while (set_len(groups) > 0):
-		egroup_id = set_pop(groups2
-		if (set_in(allAssociationDestinations(core, group_id, "owner"),
-		current_user_id)): admin = " A " else: admin = "   "
+		group_id = set_pop(groups)
+		if (set_in(allAssociationDestinations(core, group_id, "owner"), current_user_id)):
+			admin = " A "
+		else:
+			admin = "   "
 
 		result = result + (string_join(admin, read_attribute(core, group_id, "name")) + "\n")
 

+ 0 - 13
unit/test_all.py

@@ -689,19 +689,6 @@ class TestModelverse(unittest.TestCase):
         admin_promote("HUTN")
         admin_demote("HUTN")
 
-        # Unknown user
-        try:
-            admin_promote("user3")
-            self.fail()
-        except UnknownUser:
-            pass
-
-        try:
-            admin_demote("user4")
-            self.fail()
-        except UnknownUser:
-            pass
-
         # Can also demote ourselves again
         admin_demote("user")