diff --git a/build/Version.props b/build/Version.props index 1fb328a5a3..5bef0c936b 100644 --- a/build/Version.props +++ b/build/Version.props @@ -4,7 +4,7 @@ 4.4.0 2.0.0 - 7.0.0 + 7.0.1 8.0.0 5.2.2 0.4.0 diff --git a/src/Tgstation.Server.Host/Controllers/ByondController.cs b/src/Tgstation.Server.Host/Controllers/ByondController.cs index 76efcd7689..490c6308db 100644 --- a/src/Tgstation.Server.Host/Controllers/ByondController.cs +++ b/src/Tgstation.Server.Host/Controllers/ByondController.cs @@ -101,7 +101,9 @@ namespace Tgstation.Server.Host.Controllers [TgsAuthorize(ByondRights.InstallOfficialOrChangeActiveVersion | ByondRights.InstallCustomVersion)] [ProducesResponseType(typeof(Api.Models.Byond), 200)] [ProducesResponseType(typeof(Api.Models.Byond), 202)] +#pragma warning disable CA1506 // TODO: Decomplexify public async Task Update([FromBody] Api.Models.Byond model, CancellationToken cancellationToken) +#pragma warning restore CA1506 { if (model == null) throw new ArgumentNullException(nameof(model)); @@ -147,7 +149,7 @@ namespace Tgstation.Server.Host.Controllers // run the install through the job manager var job = new Models.Job { - Description = $"Install BYOND version {model.Version}", + Description = $"Install {(model.Content == null ? String.Empty : "custom ")}BYOND version {model.Version.Major}.{model.Version.Minor}", StartedBy = AuthenticationContext.User, CancelRightsType = RightsType.Byond, CancelRight = (ulong)ByondRights.CancelInstall, diff --git a/tests/Tgstation.Server.Api.Tests/Rights/TestRights.cs b/tests/Tgstation.Server.Api.Tests/Rights/TestRights.cs index eb65d25aac..dee8aa111f 100644 --- a/tests/Tgstation.Server.Api.Tests/Rights/TestRights.cs +++ b/tests/Tgstation.Server.Api.Tests/Rights/TestRights.cs @@ -40,7 +40,7 @@ namespace Tgstation.Server.Api.Rights.Tests [TestMethod] public void TestAllRightsWorks() { - var allByondRights = ByondRights.CancelInstall | ByondRights.ChangeVersion | ByondRights.ListInstalled | ByondRights.ReadActive; + var allByondRights = ByondRights.CancelInstall | ByondRights.InstallOfficialOrChangeActiveVersion | ByondRights.ListInstalled | ByondRights.ReadActive | ByondRights.InstallCustomVersion; var automaticByondRights = RightsHelper.AllRights(); Assert.AreEqual(allByondRights, automaticByondRights); diff --git a/tests/Tgstation.Server.Host.Tests/Security/TestAuthenticationContext.cs b/tests/Tgstation.Server.Host.Tests/Security/TestAuthenticationContext.cs index 0208a1bdc1..c5c45cebce 100644 --- a/tests/Tgstation.Server.Host.Tests/Security/TestAuthenticationContext.cs +++ b/tests/Tgstation.Server.Host.Tests/Security/TestAuthenticationContext.cs @@ -43,7 +43,7 @@ namespace Tgstation.Server.Host.Security.Tests var authContext = new AuthenticationContext(null, user, instanceUser); user.AdministrationRights = AdministrationRights.WriteUsers; - instanceUser.ByondRights = ByondRights.ChangeVersion | ByondRights.ReadActive; + instanceUser.ByondRights = ByondRights.InstallOfficialOrChangeActiveVersion | ByondRights.ReadActive; Assert.AreEqual((ulong)user.AdministrationRights, authContext.GetRight(RightsType.Administration)); Assert.AreEqual((ulong)instanceUser.ByondRights, authContext.GetRight(RightsType.Byond)); }