]> git.stg.codes - stg.git/commitdiff
AO: don't unauthorize user that was not authorized by us.
authorMaxim Mamontov <faust.madf@gmail.com>
Wed, 20 Feb 2013 20:00:40 +0000 (22:00 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Wed, 20 Feb 2013 20:00:40 +0000 (22:00 +0200)
projects/stargazer/plugins/authorization/ao/ao.cpp

index 9640e2e8b218de94a5cce005753a618c8e5e1c7b..100e0557603f16faed29d1da098e9d48450868f8 100644 (file)
@@ -242,7 +242,8 @@ UpdateUserAuthorization(u);
 //-----------------------------------------------------------------------------
 void AUTH_AO::DelUser(USER_PTR u)
 {
 //-----------------------------------------------------------------------------
 void AUTH_AO::DelUser(USER_PTR u)
 {
-users->Unauthorize(u->GetLogin(), this);
+if (u->IsAuthorizedBy(this))
+    users->Unauthorize(u->GetLogin(), this);
 UnSetUserNotifiers(u);
 usersList.remove(u);
 }
 UnSetUserNotifiers(u);
 usersList.remove(u);
 }