diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b20123d9fd..8889aa3fd1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -162,3 +162,7 @@ Just becuase something isn't on this list doesn't mean that it's acceptable. Use Yes, we know that the files have a tonne of mixed Windows and Linux line endings. Attempts to fix this have been met with less than stellar success, and as such we have decided to give up caring until there comes a time when it matters. Therefore, EOF settings of main repo are forbidden territory one must avoid wandering into, at risk of losing body and/or mind to the Git gods. + +## Other Notes + +* Feel free to add your nuget account to TGServiceInterface/Packages.nuspec authors list if you modify the interface \ No newline at end of file diff --git a/TGServerService/ServerInstance/Administration.cs b/TGServerService/ServerInstance/Administration.cs index edd69e730c..50e42e7f5f 100644 --- a/TGServerService/ServerInstance/Administration.cs +++ b/TGServerService/ServerInstance/Administration.cs @@ -38,9 +38,14 @@ namespace TGServerService { if (TheDroidsWereLookingFor == null) return "ADMIN"; - - var pc = new PrincipalContext(ContextType.Machine); - return GroupPrincipal.FindByIdentity(pc, IdentityType.Sid, TheDroidsWereLookingFor.Value).Name; + + string res = null; + try + { + res = GroupPrincipal.FindByIdentity(new PrincipalContext(ContextType.Machine), IdentityType.Sid, TheDroidsWereLookingFor.Value).Name; + } + catch { } + return res ?? GroupPrincipal.FindByIdentity(new PrincipalContext(ContextType.Domain), IdentityType.Sid, TheDroidsWereLookingFor.Value).Name; } catch { @@ -66,11 +71,12 @@ namespace TGServerService /// Set based off either an ed name or a string from the config /// /// The name of the group to search for + /// Recursive parameter used to check for the group using instead of /// The name of the group allowed to access the if it could be found, otherwise - string FindTheDroidsWereLookingFor(string search = null) + string FindTheDroidsWereLookingFor(string search = null, bool useDomain = false) { //find the group that is authorized to use the tools - var pc = new PrincipalContext(ContextType.Machine); + var pc = new PrincipalContext(useDomain ? ContextType.Domain : ContextType.Machine); var config = Properties.Settings.Default; var groupName = search ?? config.AuthorizedGroupSID; if (String.IsNullOrWhiteSpace(groupName)) @@ -82,7 +88,7 @@ namespace TGServerService //try again with all types gp = GroupPrincipal.FindByIdentity(pc, search); if (gp == null) - return null; + return useDomain ? null : FindTheDroidsWereLookingFor(search, true); } TheDroidsWereLookingFor = gp.Sid; if (search != null) diff --git a/TGServiceInterface/TGServiceInterface.csproj b/TGServiceInterface/TGServiceInterface.csproj index ea546a5b8a..1690c9acb1 100644 --- a/TGServiceInterface/TGServiceInterface.csproj +++ b/TGServiceInterface/TGServiceInterface.csproj @@ -72,6 +72,7 @@ + diff --git a/TGServiceInterface/TGServiceInterface.nuspec b/TGServiceInterface/TGServiceInterface.nuspec new file mode 100644 index 0000000000..1fcc57fd2a --- /dev/null +++ b/TGServiceInterface/TGServiceInterface.nuspec @@ -0,0 +1,24 @@ + + + + $id$ + $version$ + Cyberboss + https://github.com/tgstation/tgstation-server/blob/master/LICENSE + https://github.com/tgstation/tgstation-server + https://tgstation.github.io/tgstation-server/tgs.ico + false + Interface for managing /tg/station server + Copyright 2017 + https://github.com/tgstation/tgstation-server/releases/tag/tgstation-server-v$version$ + tgstation game-server byond service toolset wcf ss13 client-lib tgstation-server api wcf-service soap + + + + + + + + + + \ No newline at end of file diff --git a/Version.cs b/Version.cs index cd11a44fd9..a2cab3979f 100644 --- a/Version.cs +++ b/Version.cs @@ -12,6 +12,6 @@ using System.Reflection; // [assembly: AssemblyVersion("1.0.*")] //It's impossible to make these a define, don't say I didn't warn you -[assembly: AssemblyVersion("3.1.6.1")] -[assembly: AssemblyFileVersion("3.1.6.1")] -[assembly: AssemblyInformationalVersion("3.1.6.1")] +[assembly: AssemblyVersion("3.1.6.3")] +[assembly: AssemblyFileVersion("3.1.6.3")] +[assembly: AssemblyInformationalVersion("3.1.6.3")] diff --git a/appveyor.yml b/appveyor.yml index 8b30349763..11c3ad0381 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -16,6 +16,8 @@ artifacts: name: TGS3Client - path: MD5-SHA1-Client-v*.txt name: MD5SHA1Client +cache: + - packages -> **\packages.config install: - choco install fciv doxygen.portable graphviz.portable before_build: @@ -24,17 +26,25 @@ build: project: TGStationServer3.sln parallel: true verbosity: minimal + publish_nuget: true after_build: - ps: .\Tools\TGS3Build.ps1 - ps: if($env:APPVEYOR_REPO_COMMIT_MESSAGE -match "\[TGSDeploy\]"){$env:TGSDeploy = "Do it."} - ps: $env:TGSVersion = [System.Diagnostics.FileVersionInfo]::GetVersionInfo("$env:APPVEYOR_BUILD_FOLDER/TGServerService/bin/x86/Release/TGServerService.exe").FileVersion deploy: - release: "tgstation-server-v$(TGSVersion)" - description: 'The /tg/station server suite' - provider: GitHub - auth_token: - secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK - artifact: TGS3Server,MD5SHA1Server,TGS3Client,MD5SHA1Client - draft: false - on: - TGSDeploy: "Do it." + - provider: GitHub + release: "tgstation-server-v$(TGSVersion)" + description: 'The /tg/station server suite' + auth_token: + secure: lJNGAXwiB5HlWdthz3K4PetqpTG5IEAyRgKaiKxFMQ8HW8CcOjRtB97B05op7BsK + artifact: TGS3Server,MD5SHA1Server,TGS3Client,MD5SHA1Client + draft: false + on: + TGSDeploy: "Do it." + - provider: NuGet + api_key: + secure: bedsYuLMqGREzkVkJqRx+BTMgOvDO76tgaNc8sW5E3Ao6iw8oGHdJ/BZov8y0iKa + skip_symbols: true + artifact: /.*\.nupkg/ + on: + TGSDeploy: "Do it."