Unverified Commit 853ec92d authored by mvdbeek's avatar mvdbeek
Browse files

Merge branch 'release_24.0' into release_24.1

parents 5b5b273f 4b17f1b5
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -5646,6 +5646,15 @@ export interface components {
             */
            url: string;
        };
        /** GroupUpdatePayload */
        GroupUpdatePayload: {
            /** name of the group */
            name?: string | null;
            /** role IDs */
            role_ids?: string[] | null;
            /** user IDs */
            user_ids?: string[] | null;
        };
        /** GroupUserListResponse */
        GroupUserListResponse: components["schemas"]["GroupUserResponse"][];
        /** GroupUserResponse */
@@ -15967,7 +15976,7 @@ export interface operations {
        };
        requestBody: {
            content: {
                "application/json": components["schemas"]["GroupCreatePayload"];
                "application/json": components["schemas"]["GroupUpdatePayload"];
            };
        };
        responses: {
+17 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ const props = withDefaults(
        };
        extensions?: Array<string>;
        type?: string;
        collectionTypes?: Array<string>;
        flavor?: string;
        tag?: string;
    }>(),
@@ -46,6 +47,7 @@ const props = withDefaults(
        value: undefined,
        extensions: () => [],
        type: "data",
        collectionTypes: undefined,
        flavor: undefined,
        tag: undefined,
    }
@@ -317,14 +319,28 @@ function handleIncoming(incoming: Record<string, unknown>, partial = true) {
                const newName = v.name ? v.name : newId;
                const newSrc =
                    v.src || (v.history_content_type === "dataset_collection" ? SOURCE.COLLECTION : SOURCE.DATASET);
                const newValue = {
                const newValue: DataOption = {
                    id: newId,
                    src: newSrc,
                    batch: false,
                    map_over_type: undefined,
                    hid: newHid,
                    name: newName,
                    keep: true,
                    tags: [],
                };
                if (v.collection_type && props.collectionTypes?.length > 0) {
                    if (!props.collectionTypes.includes(v.collection_type)) {
                        const mapOverType = props.collectionTypes.find((collectionType) =>
                            v.collection_type.endsWith(collectionType)
                        );
                        if (!mapOverType) {
                            return false;
                        }
                        newValue["batch"] = true;
                        newValue["map_over_type"] = mapOverType;
                    }
                }
                // Verify that new value has corresponding option
                const keepKey = `${newId}_${newSrc}`;
                const existingOptions = props.options && props.options[newSrc];
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ export type DataOption = {
    hid: number;
    is_dataset?: boolean;
    keep: boolean;
    batch: boolean;
    map_over_type?: string;
    name: string;
    src: string;
+1 −0
Original line number Diff line number Diff line
@@ -297,6 +297,7 @@ function onAlert(value: string | undefined) {
                :options="attrs.options"
                :tag="attrs.tag"
                :type="props.type"
                :collection-types="attrs.collection_types"
                @alert="onAlert" />
            <FormDrilldown
                v-else-if="props.type === 'drill_down'"
+15 −6
Original line number Diff line number Diff line
@@ -17,7 +17,10 @@ from galaxy.model import Group
from galaxy.model.base import transaction
from galaxy.model.scoped_session import galaxy_scoped_session
from galaxy.schema.fields import Security
from galaxy.schema.groups import GroupCreatePayload
from galaxy.schema.groups import (
    GroupCreatePayload,
    GroupUpdatePayload,
)
from galaxy.structured_app import MinimalManagerApp


@@ -76,7 +79,7 @@ class GroupsManager:
        item["roles_url"] = self._url_for(trans, "group_roles", group_id=encoded_id)
        return item

    def update(self, trans: ProvidesAppContext, group_id: int, payload: GroupCreatePayload):
    def update(self, trans: ProvidesAppContext, group_id: int, payload: GroupUpdatePayload):
        """
        Modifies a group.
        """
@@ -86,13 +89,19 @@ class GroupsManager:
            self._check_duplicated_group_name(sa_session, name)
            group.name = name
            sa_session.add(group)
        user_ids = payload.user_ids
        users = get_users_by_ids(sa_session, user_ids)
        role_ids = payload.role_ids
        roles = get_roles_by_ids(sa_session, role_ids)

        users = None
        if payload.user_ids is not None:
            users = get_users_by_ids(sa_session, payload.user_ids)

        roles = None
        if payload.role_ids is not None:
            roles = get_roles_by_ids(sa_session, payload.role_ids)

        self._app.security_agent.set_entity_group_associations(
            groups=[group], roles=roles, users=users, delete_existing_assocs=False
        )

        with transaction(sa_session):
            sa_session.commit()

Loading