updated group api so it is not under tasks
This commit is contained in:
parent
d9765220bd
commit
0bbe67971f
|
@ -1115,11 +1115,11 @@ paths:
|
|||
items:
|
||||
$ref: "#/components/schemas/Task"
|
||||
|
||||
/tasks/user-groups:
|
||||
/user-groups/for-current-user:
|
||||
get:
|
||||
tags:
|
||||
- Process Instances
|
||||
operationId: spiffworkflow_backend.routes.process_api_blueprint.task_list_user_groups
|
||||
operationId: spiffworkflow_backend.routes.process_api_blueprint.user_groups_for_current_user
|
||||
summary: Group identifiers for current logged in user
|
||||
responses:
|
||||
"200":
|
||||
|
|
|
@ -81,6 +81,11 @@ permissions:
|
|||
users: []
|
||||
allowed_permissions: [read]
|
||||
uri: /v1.0/service-tasks
|
||||
user-groups-for-current-user:
|
||||
groups: [everybody]
|
||||
users: []
|
||||
allowed_permissions: [read]
|
||||
uri: /v1.0/user-groups/for-current-user
|
||||
|
||||
|
||||
# read all for everybody
|
||||
|
|
|
@ -1322,8 +1322,8 @@ def task_list_for_my_groups(
|
|||
)
|
||||
|
||||
|
||||
def task_list_user_groups() -> flask.wrappers.Response:
|
||||
"""Task_list_user_groups."""
|
||||
def user_groups_for_current_user() -> flask.wrappers.Response:
|
||||
"""User_groups_for_current_user."""
|
||||
groups = g.user.groups
|
||||
# TODO: filter out the default group and have a way to know what is the default group
|
||||
group_identifiers = [i.identifier for i in groups if i.identifier != "everybody"]
|
||||
|
|
|
@ -7,7 +7,7 @@ export default function TasksWaitingForMyGroups() {
|
|||
|
||||
useEffect(() => {
|
||||
HttpService.makeCallToBackend({
|
||||
path: `/tasks/user-groups`,
|
||||
path: `/user-groups/for-current-user`,
|
||||
successCallback: setUserGroups,
|
||||
});
|
||||
}, [setUserGroups]);
|
||||
|
|
Loading…
Reference in New Issue