-
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable state change in complex edit (#2003)
- Loading branch information
Showing
22 changed files
with
579 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
backend/api/src/main/kotlin/io/tolgee/hateoas/apiKey/ApiKeyPermissionsModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package io.tolgee.hateoas.apiKey | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema | ||
import io.tolgee.hateoas.permission.IPermissionModel | ||
import io.tolgee.model.enums.ProjectPermissionType | ||
import io.tolgee.model.enums.Scope | ||
import org.springframework.hateoas.RepresentationModel | ||
import org.springframework.hateoas.server.core.Relation | ||
|
||
@Suppress("unused") | ||
@Relation(collectionRelation = "permissions", itemRelation = "permissions") | ||
class ApiKeyPermissionsModel( | ||
@Schema(description = """The API key's project id or the one provided as query param""") | ||
val projectId: Long, | ||
|
||
override var viewLanguageIds: Set<Long>?, | ||
|
||
override val translateLanguageIds: Set<Long>?, | ||
|
||
override var stateChangeLanguageIds: Set<Long>?, | ||
|
||
override var scopes: Array<Scope> = arrayOf(), | ||
|
||
@get:Schema( | ||
description = "The user's permission type. This field is null if user has assigned " + | ||
"granular permissions or if returning API key's permissions", | ||
) | ||
override val type: ProjectPermissionType? | ||
) : RepresentationModel<ApiKeyPermissionsModel>(), IPermissionModel |
Oops, something went wrong.