mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-07-19 20:13:45 +01:00
Fix Nuget memes and tests [APIDeploy][NugetDeploy]
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
<!-- Integration tests will ensure they match across the board -->
|
||||
<TgsCoreVersion>4.4.0</TgsCoreVersion>
|
||||
<TgsConfigVersion>2.0.0</TgsConfigVersion>
|
||||
<TgsApiVersion>7.0.0</TgsApiVersion>
|
||||
<TgsApiVersion>7.0.1</TgsApiVersion>
|
||||
<TgsClientVersion>8.0.0</TgsClientVersion>
|
||||
<TgsDmapiVersion>5.2.2</TgsDmapiVersion>
|
||||
<TgsControlPanelVersion>0.4.0</TgsControlPanelVersion>
|
||||
|
||||
@@ -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<IActionResult> 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,
|
||||
|
||||
@@ -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<ByondRights>();
|
||||
|
||||
Assert.AreEqual(allByondRights, automaticByondRights);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user