Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
7ff17980
Commit
7ff17980
authored
Jun 07, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display user access type for each group
Also adds unit tests for this
parent
ff052757
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
app/assets/javascripts/groups/components/group_item.vue
app/assets/javascripts/groups/components/group_item.vue
+2
-0
app/assets/javascripts/groups/stores/groups_store.js
app/assets/javascripts/groups/stores/groups_store.js
+3
-0
spec/javascripts/groups/group_item_spec.js
spec/javascripts/groups/group_item_spec.js
+1
-0
spec/javascripts/groups/mock_data.js
spec/javascripts/groups/mock_data.js
+4
-4
No files found.
app/assets/javascripts/groups/components/group_item.vue
View file @
7ff17980
...
...
@@ -190,6 +190,8 @@ export default {
class=
"title"
>
<a
:href=
"group.webUrl"
>
{{
fullPath
}}
</a>
as
<span
class=
"access-type"
>
{{
group
.
permissions
.
humanGroupAccess
}}
</span>
</div>
<div
class=
"description"
>
{{
group
.
description
}}
</div>
...
...
app/assets/javascripts/groups/stores/groups_store.js
View file @
7ff17980
...
...
@@ -130,6 +130,9 @@ export default class GroupsStore {
isOrphan
:
false
,
numberProjects
:
rawGroup
.
number_projects_with_delimiter
,
numberUsers
:
rawGroup
.
number_users_with_delimiter
,
permissions
:
{
humanGroupAccess
:
rawGroup
.
permissions
.
human_group_access
,
},
subGroups
:
{},
};
}
...
...
spec/javascripts/groups/group_item_spec.js
View file @
7ff17980
...
...
@@ -38,6 +38,7 @@ describe('Groups Component', () => {
expect
(
component
.
$el
.
querySelector
(
'
.group-visibility
'
)).
toBeDefined
();
expect
(
component
.
$el
.
querySelector
(
'
.avatar-container
'
)).
toBeDefined
();
expect
(
component
.
$el
.
querySelector
(
'
.title
'
).
textContent
).
toContain
(
group
.
name
);
expect
(
component
.
$el
.
querySelector
(
'
.access-type
'
).
textContent
).
toContain
(
group
.
permissions
.
humanGroupAccess
);
expect
(
component
.
$el
.
querySelector
(
'
.description
'
).
textContent
).
toContain
(
group
.
description
);
expect
(
component
.
$el
.
querySelector
(
'
.edit-group
'
)).
toBeDefined
();
expect
(
component
.
$el
.
querySelector
(
'
.leave-group
'
)).
toBeDefined
();
...
...
spec/javascripts/groups/mock_data.js
View file @
7ff17980
...
...
@@ -15,7 +15,7 @@ const group1 = {
number_users_with_delimiter
:
'
1
'
,
has_subgroups
:
true
,
permissions
:
{
group_access
:
50
,
human_group_access
:
'
Master
'
,
},
};
...
...
@@ -37,7 +37,7 @@ const group14 = {
number_users_with_delimiter
:
'
1
'
,
has_subgroups
:
true
,
permissions
:
{
group_access
:
30
,
human_group_access
:
'
Master
'
,
},
};
...
...
@@ -58,7 +58,7 @@ const group2 = {
number_users_with_delimiter
:
'
1
'
,
has_subgroups
:
true
,
permissions
:
{
group_access
:
50
,
human_group_access
:
'
Master
'
,
},
};
...
...
@@ -79,7 +79,7 @@ const group21 = {
number_users_with_delimiter
:
'
1
'
,
has_subgroups
:
true
,
permissions
:
{
group_access
:
50
,
human_group_access
:
'
Master
'
,
},
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment