Webserver: fixed errormessages on sucessfull requests

This commit is contained in:
lukeIam committed 2013-12-13 18:02:20 +01:00
1 parent e68dafd16e
commit 21fb55ddea
1 file changed
+18 -1
+18 -1
View File
@@ -369,7 +369,7 @@ namespace ServerLib
public bool HasUserRight(int right) public bool HasUserRight(int right)
{ {
return _CheckRight((EUserRights)right); return _CheckRightWithNoErrorMessage((EUserRights)right);
} }
private static bool _CheckRight(EUserRights requestedRight) private static bool _CheckRight(EUserRights requestedRight)
@@ -398,6 +398,23 @@ namespace ServerLib
return true; return true;
} }
private static bool _CheckRightWithNoErrorMessage(EUserRights requestedRight)
{
Guid sessionKey = _GetSession();
if (sessionKey == Guid.Empty)
{
return false;
}
if (!CSessionControl.RequestRight(sessionKey, requestedRight))
{
return false;
}
return true;
}
#endregion #endregion
} }