BigW Consortium Gitlab

Commit b541adc5 by Dmitriy Zaporozhets

Merge branch 'fix-group-url' into 'master'

Expose correct path to group See merge request !12176
parents 459d8d65 a0f13d2f
......@@ -27,7 +27,7 @@ export default {
if (this.group.hasSubgroups) {
eventHub.$emit('toggleSubGroups', this.group);
} else {
window.location.href = this.group.webUrl;
window.location.href = this.group.groupPath;
}
}
},
......@@ -192,7 +192,7 @@ export default {
<div
class="avatar-container s40 hidden-xs">
<a
:href="group.webUrl">
:href="group.groupPath">
<img
class="avatar s40"
:src="group.avatarUrl"
......@@ -202,7 +202,7 @@ export default {
<div
class="title">
<a
:href="group.webUrl">{{fullPath}}</a>
:href="group.groupPath">{{fullPath}}</a>
<template v-if="group.permissions.humanGroupAccess">
as
<span class="access-type">{{group.permissions.humanGroupAccess}}</span>
......
......@@ -122,6 +122,7 @@ export default class GroupsStore {
canEdit: rawGroup.can_edit,
description: rawGroup.description,
webUrl: rawGroup.web_url,
groupPath: rawGroup.group_path,
parentId: rawGroup.parent_id,
visibility: rawGroup.visibility,
leavePath: rawGroup.leave_path,
......
......@@ -5,11 +5,15 @@ class GroupEntity < Grape::Entity
include GroupsHelper
expose :id, :name, :path, :description, :visibility
expose :web_url
expose :full_name, :full_path
expose :web_url
expose :parent_id
expose :created_at, :updated_at
expose :group_path do |group|
group_path(group)
end
expose :permissions do
expose :human_group_access do |group, options|
group.group_members.find_by(user_id: request.current_user)&.human_access
......
......@@ -6,6 +6,7 @@ const group1 = {
visibility: 'public',
avatar_url: null,
web_url: 'http://localhost:3000/groups/level1',
group_path: '/level1',
full_name: 'level1',
full_path: 'level1',
parent_id: null,
......@@ -28,6 +29,7 @@ const group14 = {
visibility: 'public',
avatar_url: null,
web_url: 'http://localhost:3000/groups/level1/level2/level3/level4',
group_path: '/level1/level2/level3/level4',
full_name: 'level1 / level2 / level3 / level4',
full_path: 'level1/level2/level3/level4',
parent_id: 1127,
......@@ -49,6 +51,7 @@ const group2 = {
visibility: 'public',
avatar_url: null,
web_url: 'http://localhost:3000/groups/devops',
group_path: '/devops',
full_name: 'devops',
full_path: 'devops',
parent_id: null,
......@@ -70,6 +73,7 @@ const group21 = {
visibility: 'public',
avatar_url: null,
web_url: 'http://localhost:3000/groups/devops/chef',
group_path: '/devops/chef',
full_name: 'devops / chef',
full_path: 'devops/chef',
parent_id: 1119,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment