diff --git a/lib/galaxy/web/base/controller.py b/lib/galaxy/web/base/controller.py index 1144c61ab4e..4eaeb16f535 100644 --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -115,6 +115,15 @@ class SharingStatusColumn( grids.GridColumn ): class Sharable: """ Mixin for a controller that manages and item that can be shared. """ + + # Implemented methods. + @web.expose + @web.require_login( "share Galaxy items" ) + def set_public_username( self, trans, id, username, **kwargs ): + """ Set user's public username and delegate to sharing() """ + trans.get_user().username = username + trans.sa_session.flush + return self.sharing( trans, id, **kwargs ) # Abstract methods. diff --git a/lib/galaxy/web/controllers/history.py b/lib/galaxy/web/controllers/history.py index 9ceda61f6c1..b676dcf3ff4 100644 --- a/lib/galaxy/web/controllers/history.py +++ b/lib/galaxy/web/controllers/history.py @@ -542,7 +542,7 @@ class HistoryController( BaseController, Sharable ): elif 'unpublish' in kwargs: history.published = False elif 'disable_link_access_and_unpubish' in kwargs: - history.importable = stored.published = False + history.importable = history.published = False elif 'unshare_user' in kwargs: user = trans.sa_session.query( trans.app.model.User ).get( trans.security.decode_id( kwargs[ 'unshare_user' ] ) ) if not user: diff --git a/templates/sharing_base.mako b/templates/sharing_base.mako index c66d4d91eaf..12dda834d16 100644 --- a/templates/sharing_base.mako +++ b/templates/sharing_base.mako @@ -71,64 +71,82 @@
Anyone can view and import this ${item_class_name_lc} by visiting the following URL: - <% url = h.url_for( action='display_by_username_and_slug', username=trans.get_user().username, slug=item.slug, qualified=True ) %> -
- ${url} -- - %if item.published: - This ${item_class_name_lc} is publicly listed and searchable in Galaxy's Published ${item_class_plural_name} section. - %endif -
You can: -
-