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