Fixed ProfileAccess over webserver
This commit is contained in:
1 parent
c29ae91379
commit
eca41bab2f
4 files changed
+139
-61
No files matched your search
@@ -181,11 +181,14 @@ namespace ServerLib
|
||||
{
|
||||
Guid sessionKey = getSession();
|
||||
|
||||
if (sessionKey == Guid.Empty || (!SessionControl.requestRight(sessionKey, UserRights.EditAllProfiles) &&
|
||||
SessionControl.getUserIdFromSession(sessionKey) != profile.ProfileId))
|
||||
if (profile.ProfileId != -1) //-1 is the id for a new profile
|
||||
{
|
||||
WebOperationContext.Current.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.Forbidden;
|
||||
return false;
|
||||
if (sessionKey == Guid.Empty || (!SessionControl.requestRight(sessionKey, UserRights.EditAllProfiles) &&
|
||||
SessionControl.getUserIdFromSession(sessionKey) != profile.ProfileId))
|
||||
{
|
||||
WebOperationContext.Current.OutgoingResponse.StatusCode = System.Net.HttpStatusCode.Forbidden;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (CServer.SendProfileData == null)
|
||||
|
||||
Reference in new issue
Block a user