public AccountAccess SetAccountAccess(AccountAccessClientData accessData) { Try.Argument(accessData, nameof(accessData)); var slaveAccount = UserContext.Accounts.GetOrFail(accessData.SlaveLogin); var masterAccount = UserContext.Accounts.GetOrFail(accessData.MasterLogin); if (accessData.Role != AccountAccessRoles.None) { CheckForAccessOverSlave(slaveAccount, AccountAccessRoles.Admin); } return(SetAccountAccess_Checked(slaveAccount, masterAccount, accessData.Role)); }
public IHttpActionResult SetAccountAccesses(AccountAccessClientData accessData) { return(Ok(UserContext.Rights.SetAccountAccess(accessData))); }