From 357218e9c475ebcad8b04053e06bb8527310749b Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 15 Jun 2021 07:24:34 -0500 Subject: move Role --- src/slskd/Common/Authentication/Role.cs | 26 ++++++++++++++++++++++ .../API/Controllers/SessionController.cs | 1 + src/slskd/Service/Application/Role.cs | 26 ---------------------- src/slskd/Startup.cs | 2 +- 4 files changed, 28 insertions(+), 27 deletions(-) create mode 100644 src/slskd/Common/Authentication/Role.cs delete mode 100644 src/slskd/Service/Application/Role.cs (limited to 'src') diff --git a/src/slskd/Common/Authentication/Role.cs b/src/slskd/Common/Authentication/Role.cs new file mode 100644 index 00000000..c6c64a7c --- /dev/null +++ b/src/slskd/Common/Authentication/Role.cs @@ -0,0 +1,26 @@ +// +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// + +namespace slskd.Authentication +{ + public enum Role + { + ReadOnly = 0, + User = 1, + Administrator = 2, + } +} diff --git a/src/slskd/Service/Application/API/Controllers/SessionController.cs b/src/slskd/Service/Application/API/Controllers/SessionController.cs index b819dc57..a8e8fac5 100644 --- a/src/slskd/Service/Application/API/Controllers/SessionController.cs +++ b/src/slskd/Service/Application/API/Controllers/SessionController.cs @@ -24,6 +24,7 @@ namespace slskd.Application.API using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.IdentityModel.Tokens; + using slskd.Authentication; /// /// Session. diff --git a/src/slskd/Service/Application/Role.cs b/src/slskd/Service/Application/Role.cs deleted file mode 100644 index 74ba7f81..00000000 --- a/src/slskd/Service/Application/Role.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright (c) slskd Team. All rights reserved. -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published -// by the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see https://www.gnu.org/licenses/. -// - -namespace slskd.Application -{ - public enum Role - { - ReadOnly = 0, - User = 1, - Administrator = 2, - } -} diff --git a/src/slskd/Startup.cs b/src/slskd/Startup.cs index 894c0e53..2f35e6fc 100644 --- a/src/slskd/Startup.cs +++ b/src/slskd/Startup.cs @@ -33,7 +33,7 @@ namespace slskd using Prometheus; using Prometheus.SystemMetrics; using Serilog; - using slskd.API.Authentication; + using slskd.Authentication; using slskd.Cryptography; using slskd.Messaging; using slskd.Peer; -- cgit v1.2.3