Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement endpoints to list available permissions #108

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions daemon/core/application/services/AuthService.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* === This file is part of bxt ===
*
* SPDX-FileCopyrightText: 2022 Artem Grinev <[email protected]>
* SPDX-FileCopyrightText: 2024 Daniil Lyudvig <[email protected]>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move header appendices to the corresponding commit where you change the file.

* SPDX-License-Identifier: AGPL-3.0-or-later
*
*/
Expand Down
1 change: 1 addition & 0 deletions daemon/core/application/services/AuthService.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* === This file is part of bxt ===
*
* SPDX-FileCopyrightText: 2022 Artem Grinev <[email protected]>
* SPDX-FileCopyrightText: 2024 Daniil Lyudvig <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*
*/
Expand Down
1 change: 1 addition & 0 deletions daemon/core/application/services/UserService.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* === This file is part of bxt ===
*
* SPDX-FileCopyrightText: 2022 Artem Grinev <[email protected]>
* SPDX-FileCopyrightText: 2024 Daniil Lyudvig <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*
*/
Expand Down
1 change: 1 addition & 0 deletions daemon/core/application/services/UserService.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* === This file is part of bxt ===
*
* SPDX-FileCopyrightText: 2022 Artem Grinev <[email protected]>
* SPDX-FileCopyrightText: 2024 Daniil Lyudvig <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*
*/
Expand Down
1 change: 1 addition & 0 deletions daemon/presentation/web-controllers/AuthController.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* === This file is part of bxt ===
*
* SPDX-FileCopyrightText: 2022 Artem Grinev <[email protected]>
* SPDX-FileCopyrightText: 2024 Daniil Lyudvig <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*
*/
Expand Down
1 change: 1 addition & 0 deletions daemon/presentation/web-controllers/AuthController.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* === This file is part of bxt ===
*
* SPDX-FileCopyrightText: 2022 Artem Grinev <[email protected]>
* SPDX-FileCopyrightText: 2024 Daniil Lyudvig <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*
*/
Expand Down
1 change: 1 addition & 0 deletions daemon/presentation/web-controllers/UserController.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* === This file is part of bxt ===
*
* SPDX-FileCopyrightText: 2022 Artem Grinev <[email protected]>
* SPDX-FileCopyrightText: 2024 Daniil Lyudvig <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*
*/
Expand Down
1 change: 1 addition & 0 deletions daemon/presentation/web-controllers/UserController.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* === This file is part of bxt ===
*
* SPDX-FileCopyrightText: 2022 Artem Grinev <[email protected]>
* SPDX-FileCopyrightText: 2024 Daniil Lyudvig <[email protected]>
* SPDX-License-Identifier: AGPL-3.0-or-later
*
*/
Expand Down
40 changes: 40 additions & 0 deletions daemon/swagger/openapi.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,25 @@ paths:
description: Invalid request
"401":
description: Unauthorized
/api/auth/verify:
get:
summary: Get current user permissions based on token provided
operationId: verify
responses:
"200":
description: List of user permissions
content:
application/json:
schema:
type: array
items:
type: string
"400":
description: Invalid request
"401":
description: Unauthorized
"500":
description: Internal error
/api/logs:
get:
summary: Get package logs
Expand Down Expand Up @@ -324,6 +343,27 @@ paths:
description: Invalid request
"403":
description: No permissions
/api/users/{user_name}:
get:
summary: Get user info
operationId: getUser
parameters:
- name: user_name
in: path
required: true
schema:
type: string
responses:
"200":
description: User info
content:
application/json:
schema:
$ref: "#/components/schemas/UserResponse"
"400":
description: Invalid request
"500":
description: Internal error

components:
securitySchemes:
Expand Down