##// END OF EJS Templates
users: made the function for account deactivation easier to use inside ishell.
marcink -
r1946:fcc350c9 default
parent child Browse files
Show More
@@ -870,7 +870,7 b' class UserModel(BaseModel):'
870
870
871 return list_of_accounts
871 return list_of_accounts
872
872
873 def deactivate_last_users(self, expected_users):
873 def deactivate_last_users(self, expected_users, current_user=None):
874 """
874 """
875 Deactivate accounts that are over the license limits.
875 Deactivate accounts that are over the license limits.
876 Algorithm of which accounts to disabled is based on the formula:
876 Algorithm of which accounts to disabled is based on the formula:
@@ -885,7 +885,8 b' class UserModel(BaseModel):'
885 the end N ammoun of users from that list
885 the end N ammoun of users from that list
886 """
886 """
887
887
888 list_of_accounts = self.get_accounts_in_creation_order()
888 list_of_accounts = self.get_accounts_in_creation_order(
889 current_user=current_user)
889
890
890 for acc_id in list_of_accounts[expected_users + 1:]:
891 for acc_id in list_of_accounts[expected_users + 1:]:
891 user = User.get(acc_id)
892 user = User.get(acc_id)
General Comments 0
You need to be logged in to leave comments. Login now