Merge pull request #15400 from davelopez/23.0_fix_histories_list_anon

[23.0] Redirect anonymous users on histories/list
This commit is contained in:
David López
2023-01-27 15:51:58 +01:00
committed by GitHub
3 changed files with 9 additions and 21 deletions
+1 -9
View File
@@ -5,16 +5,8 @@
<script>
import HistoryList from "./history-list";
export default {
props: {
actionId: {
type: String,
default: null,
},
},
mounted() {
new HistoryList.View({
action_id: this.actionId,
}).$el.appendTo(this.$refs.target);
new HistoryList.View().$el.appendTo(this.$refs.target);
},
};
</script>
+2 -7
View File
@@ -62,15 +62,10 @@ var View = Backbone.View.extend({
initialize: function (options) {
const Galaxy = getGalaxyInstance();
LoadingIndicator.markViewAsLoading(this);
if (options.action_id == "list_published") {
this.active_tab = "shared";
} else if (options.action_id == "list") {
this.active_tab = "user";
}
this.active_tab = "user";
this.model = new Backbone.Model();
Utils.get({
url: `${getAppRoot()}history/${options.action_id}?${$.param(Galaxy.params)}`,
url: `${getAppRoot()}history/list?${$.param(Galaxy.params)}`,
success: (response) => {
this.model.set(response);
this.render();
+6 -5
View File
@@ -235,6 +235,12 @@ export function getRouter(Galaxy) {
component: HistoryPublishedList,
props: true,
},
{
path: "histories/list",
component: GridHistory,
props: true,
redirect: redirectAnon(),
},
{
path: "histories/:historyId/export",
get component() {
@@ -242,11 +248,6 @@ export function getRouter(Galaxy) {
},
props: true,
},
{
path: "histories/:actionId",
component: GridHistory,
props: true,
},
{
path: "interactivetool_entry_points/list",
component: InteractiveTools,