Commit Graph

19 Commits

Author SHA1 Message Date
Tommy Beadle 0de335eced Add a system hook for when a project is updated.
This sends a project_update hook when a repo is updated.  This does not include
renaming or transferring a project.  Those are covered by project_rename and
project_transfer.  This will get called, however, when the visibility is
changed.
2017-01-26 09:09:14 -05:00
Rémy Coutable 7485cec94e
Add a spec and actually display the flash notice
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-16 10:57:15 -05:00
sandish chen 81f7a7ab62 Fix to display notice when project settings updated.
Change validity checking for UpdateService.

Add return value for project update service.

Return 302(redirect_to) when successfully updated.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-15 01:31:25 -05:00
Rydkin Maxim 170efaaba2 Enable Style/MultilineOperationIndentation in Rubocop, fixes #25741 2016-12-16 21:37:22 +03:00
Douglas Barbosa Alexandre ea4d6c87d7 Fix Project#to_param to keep invalid project suitable for use in URLs 2016-07-27 13:52:45 -03:00
Douglas Barbosa Alexandre 487dfad6ac Fix renaming repository when name contains invalid chars under settings 2016-07-27 13:52:45 -03:00
Valery Sizov 3baed8cb6d Services: code style fixes, minor refactoring 2016-07-06 20:58:43 +03:00
Douwe Maan 8db1292139 Tweaks, refactoring, and specs 2016-03-20 21:04:07 +01:00
Tomasz Maczukin 1144b70ab6 Change update_forks_visibility_level into after_update hook in Project model 2015-11-20 00:13:56 +01:00
Tomasz Maczukin 945e4293cb Prevent unnecessary forks iteration at parent update 2015-11-19 23:40:29 +01:00
Tomasz Maczukin 6f41e3d9ca Change forks method to has_many relation 2015-11-18 22:11:15 +01:00
Tomasz Maczukin 89ecba5e6c Update forks visibility_level after parent project visibility_level change 2015-11-04 23:42:02 +01:00
Tomasz Maczukin 7cb442eed4 Fix Project update service
When project is updated and it is a fork, then visibility_level
should not be less restrictive than in its parent project.
2015-11-03 18:23:48 +01:00
Vinnie Okada 928fc94c3d Enforce restricted visibilities for snippets
Add new service classes to create and update project and personal
snippets.  These classes are responsible for enforcing restricted
visibility settings for non-admin users.
2015-03-08 17:57:08 -06:00
Vinnie Okada 285c534185 Allow admins to override restricted visibility
Allow admins to use restricted visibility levels when creating or
updating projects.
2015-03-08 16:10:05 -06:00
Dmitriy Zaporozhets 8fee5a0572
Make app works with strong params
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 23:24:17 +03:00
Dmitriy Zaporozhets 1dab15940d
Remove protected_atrributes gem and start moving to strong params
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-26 14:30:07 +03:00
Dmitriy Zaporozhets a7f3672b75 Remove project observer 2014-06-17 21:53:26 +03:00
Dmitriy Zaporozhets 1d2bdb4d58
Move all Context classes into Services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-16 19:03:42 +02:00