Webserver: fixed errormessages on sucessfull requests
This commit is contained in:
1 parent
e68dafd16e
commit
21fb55ddea
1 file changed
+18
-1
@@ -369,7 +369,7 @@ namespace ServerLib
|
||||
|
||||
public bool HasUserRight(int right)
|
||||
{
|
||||
return _CheckRight((EUserRights)right);
|
||||
return _CheckRightWithNoErrorMessage((EUserRights)right);
|
||||
}
|
||||
|
||||
private static bool _CheckRight(EUserRights requestedRight)
|
||||
@@ -398,6 +398,23 @@ namespace ServerLib
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user