Skip to content

Commit 82af7d2

Browse files
committed
feat: client access functionality (sourceplusplus/sourceplusplus#504)
1 parent a4b40f6 commit 82af7d2

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Source++, the open-source live coding platform.
3+
* Copyright (C) 2022 CodeBrig, Inc.
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU Affero General Public License as published
7+
* by the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU Affero General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU Affero General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
package spp.protocol.platform.auth
19+
20+
import kotlinx.serialization.Serializable
21+
22+
@Serializable
23+
data class ClientAccess(
24+
val id: String,
25+
val secret: String
26+
)

src/commonMain/kotlin/spp.protocol/platform/auth/RolePermission.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ import spp.protocol.platform.auth.CommandType.*
2222
enum class RolePermission(val manager: Boolean, val commandType: CommandType) {
2323
RESET(true, LIVE_SERVICE),
2424

25+
//clients
26+
ADD_CLIENT_ACCESS(true, LIVE_SERVICE),
27+
REMOVE_CLIENT_ACCESS(true, LIVE_SERVICE),
28+
GET_CLIENT_ACCESSORS(true, LIVE_SERVICE),
29+
UPDATE_CLIENT_ACCESS(true, LIVE_SERVICE),
30+
2531
//devs
2632
ADD_DEVELOPER(true, LIVE_SERVICE),
2733
REMOVE_DEVELOPER(true, LIVE_SERVICE),

0 commit comments

Comments
 (0)