This commit is contained in:
@@ -2583,7 +2583,7 @@ namespace AyaNova.Biz
|
||||
return;
|
||||
}
|
||||
|
||||
if (UserIsRestrictedType && (proposedObj.UserId != UserId || currentObj.UserId != UserId))
|
||||
if (UserIsRestrictedType && (proposedObj.UserId != UserId || (!isNew && currentObj.UserId != UserId)))
|
||||
{
|
||||
//no edits allowed on other people's records
|
||||
AddError(ApiErrorCode.NOT_AUTHORIZED);
|
||||
@@ -3043,13 +3043,14 @@ namespace AyaNova.Biz
|
||||
}
|
||||
}
|
||||
|
||||
if (UserIsRestrictedType && (proposedObj.UserId != UserId || currentObj.UserId != UserId))
|
||||
if (UserIsRestrictedType && (proposedObj.UserId != UserId || (!isNew && currentObj.UserId != UserId)))
|
||||
{
|
||||
//no edits allowed on other people's records
|
||||
AddError(ApiErrorCode.NOT_AUTHORIZED);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//Start date AND end date must both be null or both contain values
|
||||
if (proposedObj.ServiceStartDate == null && proposedObj.ServiceStopDate != null)
|
||||
AddError(ApiErrorCode.VALIDATION_REQUIRED, "ServiceStartDate");
|
||||
@@ -5915,7 +5916,7 @@ namespace AyaNova.Biz
|
||||
}
|
||||
}
|
||||
|
||||
if (UserIsRestrictedType && (proposedObj.UserId != UserId || currentObj.UserId != UserId))
|
||||
if (UserIsRestrictedType && (proposedObj.UserId != UserId || (!isNew && currentObj.UserId != UserId)))
|
||||
{
|
||||
//no edits allowed on other people's records
|
||||
AddError(ApiErrorCode.NOT_AUTHORIZED);
|
||||
|
||||
Reference in New Issue
Block a user