Commit graph

21 commits

Author SHA1 Message Date
Toon Claes
71306f14f6 Make level_value accept string integers
When a VisibilityLevel is an integer formatted as a string, convert it
to an integer, instead of looking it up in the hash map.

When the value is not recognized, default to PRIVATE.
2017-03-20 22:53:29 +01:00
Toon Claes
a3fdd6acd2 Use string based visibility getter & setter
Add `visibility` & `visibility=` methods to the
`Gitlab::VisibilityLevel` module so the `visibility_level` can be
get/set with a string value.
2017-03-02 12:15:25 +01:00
Toon Claes
fc28719145 A VisibilityLevel also can be presented as string
For the API, the VisibilityLevel will be exposed as String instead of
Integer. So add the string values and method to translate a level
integer to a string.
2017-03-02 09:28:41 +01:00
Douwe Maan
75f5fa997d Enable Rails/Delegate 2017-02-23 09:32:42 -06:00
Douwe Maan
ffcbc63693 List all groups/projects for admins on explore pages 2017-02-06 21:02:07 -06:00
Kamil Trzcinski
b7f4553e3e
Backport changes introduced by https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1083 2017-01-20 12:25:53 +01:00
Felipe Artur
5273335247 Fix forks creation when visibility level is restricted 2016-05-25 10:57:00 -04:00
Douwe Maan
45e8650c4f Fix specs 2016-03-20 23:26:58 +01:00
Douwe Maan
8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Zeger-Jan van de Weg
b959ae553b Improve group visibility level feature 2016-03-18 16:58:04 -03:00
Felipe Artur
0a7f716119 Code fixes 2016-03-17 19:42:46 -03:00
Felipe Artur
c3e70280df Prevent projects to have higher visibility than groups
Prevent Groups to have smaller visibility than projects
Add default_group_visibility_level to configuration
Code improvements
2016-03-10 10:38:36 -03:00
Tomasz Maczukin
3bc012db77 Fix GitlabV::isibilityLevel::level_name method 2015-11-04 22:13:40 +01:00
Tomasz Maczukin
9e1db139eb Move level_name resolving to Gitlan::VisibilityLevel 2015-11-03 17:23:19 +01:00
Valery Sizov
111ebe5471 Fork visibility level fix 2015-07-06 17:40:33 +03:00
Marin Jankovski
63f7129483 Move application setting to separate variable. 2015-03-18 13:55:41 -07:00
Vinnie Okada
e535d21768 Handle nil restricted visibility settings
Return `true` from `non_restricted_level?` when the
`restricted_visibility_levels` setting is nil.
2015-03-18 12:50:27 -06:00
Vinnie Okada
cacac147de Move restricted visibility settings to the UI
Add checkboxes to the application settings page for restricted
visibility levels, and remove those settings from gitlab.yml.
2015-03-07 13:11:08 -07:00
Job van der Voort
68fd66c6e3 block visibility level restriction override in controller 2014-08-28 20:33:41 +02:00
Jeroen van Baarsen
3c439888a6 Removed some constant allready defined warnings
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2014-07-16 20:12:46 +02:00
Jason Hollingsworth
d9bb4230cc Adding authenticated public mode (internal).
Added visibility_level icons to project view (rather than just text).
Added public projects to search results.
Added ability to restrict visibility levels standard users can set.
2013-11-26 22:22:07 -06:00