case 4232
This commit is contained in:
@@ -1733,13 +1733,13 @@ namespace AyaNova.Biz
|
|||||||
//If we have a last role, can it be removed by this User?
|
//If we have a last role, can it be removed by this User?
|
||||||
if (LastStatusInfo != null && CurrentUserRoles.HasAnyFlags(LastStatusInfo.RemoveRoles) == false)
|
if (LastStatusInfo != null && CurrentUserRoles.HasAnyFlags(LastStatusInfo.RemoveRoles) == false)
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.NOT_AUTHORIZED, "generalerror", "User roles don't align with status Remove roles");
|
AddError(ApiErrorCode.NOT_AUTHORIZED, "generalerror", "LT:WorkOrderStatus -> LT:RemoveRoles");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//Can the new role be selected by this user?
|
//Can the new role be selected by this user?
|
||||||
if (CurrentUserRoles.HasAnyFlags(NewStatusInfo.SelectRoles) == false)
|
if (CurrentUserRoles.HasAnyFlags(NewStatusInfo.SelectRoles) == false)
|
||||||
{
|
{
|
||||||
AddError(ApiErrorCode.NOT_AUTHORIZED, "generalerror", "User roles don't align with status Select roles");
|
AddError(ApiErrorCode.NOT_AUTHORIZED, "generalerror", "LT:WorkOrderStatus -> LT:SelectRoles");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//Seems legit, we'll allow it
|
//Seems legit, we'll allow it
|
||||||
|
|||||||
Reference in New Issue
Block a user