Commit graph

20 commits

Author SHA1 Message Date
Stan Hu
99c02ed53c Only use RequestStore in ProjectTeam#max_member_access_for_user if it is active 2016-08-01 13:11:45 -07:00
Stan Hu
ba192c73cd Rubocop offenses 2016-07-26 17:05:52 -07:00
Stan Hu
1fba07109f Optimize the invited group link access level check 2016-07-26 16:56:06 -07:00
Stan Hu
d1ea2bca61 Optimize maximum user access level lookup in loading of notes
NotesHelper#note_editable? and ProjectTeam#human_max_access currently
take about 16% of the load time of an issue page. This MR preloads
the maximum access level of users for all notes in issues and merge
requests with several queries instead of one per user and caches
the result in RequestStore.
2016-07-26 15:33:05 -07:00
Rémy Coutable
515205d3c1 UI and copywriting improvements
+ Move 'Edit Project/Group' out of membership-related partial
+ Show the access request buttons only to logged-in users
+ Put the request access buttons out of in a more visible button
+ Improve the copy in the #remove_member_message helper

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:18:14 +02:00
Rémy Coutable
d26f81239a Add request access for groups
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-14 13:07:26 +02:00
Douglas Barbosa Alexandre
b56c456750 Project members with guest role can't access confidential issues 2016-06-13 19:32:00 -03:00
Dmitriy Zaporozhets
55ceda1204
Bring shared project feature tests from EE
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-12 14:45:14 +01:00
Robert Speicher
924463907d Allow ProjectTeam#human_max_access to return "Owner" 2016-02-18 16:39:59 -05:00
Douwe Maan
1e8d703a85 Tag model specs 2015-12-09 10:50:51 +01:00
Valery Sizov
97e6c9b42c Wrong access level badge on MR comments 2015-10-02 15:11:17 +03:00
Robert Speicher
fb6dc1f07d Add Group#add_* convenience methods
Encapsulates the logic for `Gitlab::Access::WHATEVER` levels.
2015-08-07 00:20:02 -04:00
Robert Speicher
56246b70fb Fix Style/TrailingBlankLines cop violations 2015-06-22 14:38:33 -04:00
Jeroen van Baarsen
0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Valery Sizov
47f539f5a6 Snippets: public/internal/private 2014-10-09 17:09:53 +03:00
Dmitriy Zaporozhets
0771109bb8
Fix permission issue with highest access level for group
If user was a member of both group and project and group access level
was higher it was not respected and user got lowest project access
level. Now it is fixed and user get highest access level

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-20 12:54:03 +03:00
Jeroen van Baarsen
a705d194fa Fixed the project team specs
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2014-06-08 23:36:09 +02:00
Dmitriy Zaporozhets
c283fba3b7
Improve performance of application for large teams
This commit fixes a lot of sql queries to db for for groups and projects
with big amount of members.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-04 11:52:17 +03:00
Dmitriy Zaporozhets
9c252a60c1 remove tests for unexisting methods 2013-02-26 11:17:02 +02:00
Andrey Kumanyaev
b8dadd6427 repair rspec (remove and rename files) 2013-01-24 22:31:25 +02:00
Renamed from spec/models/team_spec.rb (Browse further)